has2k1 / plotnine

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

Explicit specification of main panel size #740

Open AlFontal opened 9 months ago

AlFontal commented 9 months ago

Hi! I know that a few iterations ago the effect of the figure_size argument in theme changed a bit and now it directly specifies the width and height of the whole figure (including legends, axis text, title, etc.).

I was wondering whether there is any way via Plotnine's API or a more hacky way to directly control the size/aspect ratio of the main panels of a figure instead of the size of the whole figure, as sometimes I generate panels that I manually put together in Inkscape (I used to do it programmatically with patchworklib but it ends up being more of a hassle sometimes) and having them have equal size (or width/height) would really speed up the postprocessing for me.

Any ideas? Thanks!

has2k1 commented 9 months ago

Matplotlib makes doing that really hard, but I see why it would be valuable. I will have it at the back of my mind.