AnacletoLAB / grape

🍇 GRAPE is a Rust/Python Graph Representation Learning library for Predictions and Evaluations

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting figure to be inline

pnrobinson opened this issue · comments

matplotlib plots figures inline by default or if we write

%matplotlib inline

Some of the figures produced by GRAPE get put into "subwindows" in the Jupyter notebook, and one needs to scroll up and down to see the entire figure. GRAPE does not seem to be responsive to the inline magic command above either.

For instance, in order for a certain figure to really appear online, I need to make it much smaller

visualizer = GraphVisualizer(sli_graph, automatically_display_on_notebooks=False)
fig, ax, cap = visualizer.plot_node_degree_distribution()
fig.set_figheight(3)
fig.set_figwidth(3)

even though the notebook could comfortably show (5,5) or even (8,8)

Hello Peter,

You can provide to the method the figure and axes to be used, so you can arbitrarily set them up beforehand or alternatively edit them afterwards as you are already doing.

I'm not sure how the %matplotlib inline works, but in the visualization, we use matplotlib directly without any fancy thing mixed up.

Maybe we can plan a short call to tackle the issue?

No worries, let's touch bases next week, I am at the ASHG this week