Closed KerenHagitStern closed 2 days ago
I love this example data set.
The vertical label size should auto-expand to fit the long group names so this might be a bug (will check). I purposely avoided trying to auto-scale the font size in cases like this and hadn't allowed wide labels to expand the width to honor the global setting for ax_size
. Perhaps a good compromise is to auto-expand the width unless the user explicitly defines the image size. I will think about it and get back to you
Disregard my message from 15 min ago. Still investigating
Just a quick update, you have indeed found a bug. I am working to fix it and will keep you posted.
OK, I have a bug fix and a new feature for you using pip install fivecentplots==0.5.0b3
By default, fcp boxplots will continue to use a default axes size of [400, 400]
, giving you something like this (notice the vertical label bug is gone, but the first row of labels is getting squished):
You still have the option to manually set the ax_size
to deal with the labels not fitting horizontally (here I used [700, 400]
):
Now I give you the option to use ax_size='auto'
which attempts to automatically resize ax_size[0]
to fit the contents (note, I still consider this "experimental" so your mileage may vary):
Let me know if you find any issues with this. Hope this gives you what you need.
Thanks a lot! I will try it
Great. Also note that you no longer need to install the beta version to try this as I've released v0.5.0. So a regular pip install fivecentplots
is enough
Hi, I tried the auto option and it worked. Can it plot the graph in a way that the X-axis is shortened to a minimum size? for example, if I changed the order of the categories on the x-axis, the ChickenId labels will be printed vertically and not horizontally ( and I prefer they will be printed vertically). thanks
I will make a ticket for this for a future release. Right now the only option is to make the ax_size small to force the rotation and I don't think this will be perfect in some cases.
As of v0.6.0, if you want to print vertically with auto scaling, just add box_group_label_rotation=90
to your plot call. Thanks!
Hi, I noticed that when my group headers don't fit the total plot size, they slide out the frames. Is there a way that the package can fit the plot size/the headers fonts/expend the headers frame, automatically (without an input ) ,so the group headers will be separated well? I attached some examples to illustrate the problem. thanks