Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting figure to be inline #24

Open
pnrobinson opened this issue Oct 24, 2022 · 2 comments
Open

Getting figure to be inline #24

pnrobinson opened this issue Oct 24, 2022 · 2 comments

Comments

@pnrobinson
Copy link
Contributor

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)

@LucaCappelletti94
Copy link
Member

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?

@pnrobinson
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants