Closed W-L closed 4 years ago
Hi there, thanks for using joypy! This is interesting, I'll try to take a look.
It looks like I can't reproduce it, using your example I'm able to print even with figsize (8,30) and everything works as expected.
Could you include your environment? (the output of pip list
or conda list
would be enough)
Thanks for taking a look. I just tried it on the command line and in IPython and indeed it works fine. It seems like this is a problem within PyCharm instead, despite using the same environment. Sorry about that..
No worries! Interesting but I wouldn't know how to help you there.
This seems to be an issue specifically with PyCharm's SciView. For future users, you can work around this by going to "File > Settings > Python Scientific" in PyCharm and unchecking "Show plots in tool window". matplotlib
plots will then appear natively, and everything seems to work fine.
Incidentally, I can confirm this issue on the latest version of PyCharm without explicitly setting figsize
. My basic plot command is
joyplot(data, labels=labels, overlap=10, kind="values", x_range=list(range(n)))
No matter the value of overlap
, the figure is generated as if overlap=0
. Negative values of overlap still throw errors.
Thanks for the heads-up! I never would have thought to try this.
There is another possible workaround in case you do not want to deactivate SciView completely. If you are using IPython within PyCharm you can use its magic commands to switch to a different plotting backend. E.g. executing %matplotlib qt
in the python console will also prompt plots to appear in a separate tool window (rendered correctly w.r.t this issue). Then simply restarting the console will make it revert to default behaviour of showing plots in SciView. Here's a link to the docs about it: ipython magic commands for matplotlib
Hi @sbebo, Thanks very much for the fantastic module. I encountered a strange behaviour when trying to control
figsize
andoverlap
, which I assume is a bug. Here's a minimum code example:With these arguments the plot is created normally:
But for any height value of
figsize
that is higher than3.3
in this case, all density plots appear extremely flattened, and changing the overlap has no effect at all:I noticed this when working on some larger data, and the "threshold" of this sudden change was at a different value for the height of
figsize
Is there a way to have a larger figure but prevent this from happening? Thanks!