-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
DOC: use markers as slanted breaks in broken axis example #15928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: use markers as slanted breaks in broken axis example #15928
Conversation
b46062e
to
a81bd57
Compare
Either slanted markers, or Line2D with transform=IdentityTransform() (... plus some translation) to be in pixel space, I guess. |
ax2.plot((1 - d, 1 + d), (1 - d, 1 + d), **kwargs) # bottom-right diagonal | ||
d = .5 # proportion of vertical to horizontal extent of the slanted line | ||
kwargs = dict(marker=[(-1, -d), (1, d)], markersize=12, | ||
linestyle="none", color='k', mec='k', mew=1, clip_on=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps use mew=rcParams["axes.linewidth"] here? 1 looks a bit thick (the rc value is 0.8).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think 0.8 looks better than 1 (hence the suggestion) but am fine with your choice too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one small point, take it or leave it, can self-merge after that.
I'm not currently up to date as to which branch documentation should go to. So maybe someone who knows can merge. |
recent doc prs were milestoned as 3.3, so let's put this here too. |
PR Summary
The broken axis example should use markers for the slanted lines that denote the "axis break" instead of lines. This will make the example usable independent on the actual axis size; e.g. if the break does not occur in the middle of the axis.
(The problem was initially brought up in this Stackoverflow issue)
PR Checklist