Closed dmandic17 closed 2 years ago
I think the problem here may be that seaborn
is using its own custom rc's that don't fully cooperate with pyplot
.
You could try manually setting sns.set(rc={"font.size":9})
as a quick fix. But in general, it may be that seaborn and tueplots just don't mix well. They're both trying to do similar things (i.e. change the default parameters of matplotlib), and may thus be messing with each other.
So if you like seaborn
so much that you don't want to give it up, you may have to live without tueplots
. Note that you can do the bar plots in plain pyplot, too.
Hi @dmandic17, thanks for raising this issue!
@philipphennig is right.
However, instead of plt.rcParams.update
, seaborn.set(rc=bundles.neurips2021())
seems to work on my machine, which is good news.
The bad news are that the bar-label-text-size does not have the corresponding rcParams
, which can be adjusted to make your plot look good automatically. (At least, I didnt find any.) This means that on the tueplots
side, we cannot do anything to resolve your issue.
You will have to manually set the label size of the bars to, e.g., small
. Then, things should look fine.
I have not tried what happened if you make the same bar plot in matplotlib directly, but I think the same issue applies (i.e. calling bar_label(..., fontsize="small")
if you want smaller fonts.
Does that help?
Both plt.rcParams.update
and seaborn.set(rc=bundles.neurips2021())
fix all the plots for me, this problem arises just when trying adding additional text with Axes.text(...)
. But yes, manually setting the fontsize
here seems to be fixing this issue.
Thank you for your responses! @philipphennig @pnkraemer
Thanks for getting back to us. I will close the issue then. Please reopen if it is not fully resolved. :)
Hi,
I tried using tueplots but encountered some weird bug, where my plot got from this:
to this:
just by removing defined figsize and adding:
Example code can be found here.
Is this a bug or am I missing something?