has2k1 / plotnine

A Grammar of Graphics for Python
https://plotnine.org
MIT License
3.89k stars 209 forks source link

Please loosen the restrictions on theme(figure_size=( , )) #783

Open jnhyeon opened 2 months ago

jnhyeon commented 2 months ago

Thank you for creating a good package.

I set the height of figure_size to 30, so the chart needs to be viewed vertically. However, the height of figure_size is currently limited to 25. Please loosen the restrictions on theme(figure_size=( , )).

Thank you

has2k1 commented 2 months ago

If you are setting height of 25 inches, and assuming the default dpi=100 that gives height=2500px. The retina version has height=5000px. So any height above 25 inches is probably not for an inline image. Is this a wrong assumption?

If it isn't and you intend to save a large image, you can override the restriction with p.save("plot.png", limitsize=False). Does this work for you?

jnhyeon commented 2 months ago

Thank you for your quick reply.

I am performing data analysis using a notebook in VSCode. As shown in the attached image, there are many items, so a long vertical bar chart must be drawn. Since it is not saved as an image, the p.save() function cannot be used. I would like to display a bar chart on the output screen of the notebook. Is there any way?

Thank you

image image