brokenaxes icon indicating copy to clipboard operation
brokenaxes copied to clipboard

bug on `clip_on=False`

Open iTomxy opened this issue 3 years ago • 6 comments

  • version: brokenaxes 0.5.0

I'm using clip_on=False when plotting like this:

import matplotlib.pyplot as plt 
from brokenaxes import brokenaxes 
import numpy as np 

fig = plt.figure(figsize=(6,4))
baxes = brokenaxes(ylims=((0,30000),(75000,85000)), hspace=.1, despine=False)

X = np.sort(np.array([3,-1,0,4,5,-2,7]))
Y = np.array([80000,10000,5000,3000,1000,500,100])
Z = np.array([800,1000,1200,3000,10000,30000,15000])

baxes.plot(X,Y,label="squared", clip_on=False)  # here
baxes.plot(X,Z,label="cubed", clip_on=False)  # here
baxes.legend(loc="best")

plt.plot()
plt.show()

And it shows: clip But if I set clip_on to True (or simply don't pass it), it's normal: clip

iTomxy avatar Apr 10 '22 17:04 iTomxy

What behavior are you trying to achieve with clip_on?

bendichter avatar Apr 10 '22 17:04 bendichter

Oh, I also used marker in my code. I missed this point in this snippet. The original code is like this:

bax.plot(_p, _r, label=_label, c=COLOR[algo], marker=_marker, clip_on=False)

iTomxy avatar Apr 10 '22 17:04 iTomxy

HI @bendichter

For scatter plot, we also need clip_on=False, correct?

y9c avatar May 07 '22 23:05 y9c

clip_on = True, dots are not completely show.

image

clip_on = False bugs.. image

y9c avatar May 07 '22 23:05 y9c

If you have points that exceed 100

bendichter avatar May 08 '22 05:05 bendichter

Yes. But I mean the dots near the limit is clip

y9c avatar May 08 '22 13:05 y9c