-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix anatomy figure on v2.x #7128
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
Conversation
Can you please put the tick inwards back? It doesn't look very good as is. |
The changes of code are fine. The changes in the styles are not looking very good. Can you please revert how the figure looks as it was before? |
Outward ticks are the new default; I don't see why this figure should not follow that. |
Because inward ticks look much much better on this plot. |
An argument for leaving the ticks pointing out in this example is that it is the new default and, aesthetics aside, leaving the defaults in this example will confuse new users less. |
We have 100 examples with the defaults in the gallery, and we are lacking nice looking one. I don't think it is worth adding this with the current design. It does not illustrate anything, and presents IMO no interest with the new version. |
This plot is full of customizations, so adding one more--inward ticks--is no big deal. It won't increase the confusion. On the other hand, I think that leaving the ticks outward is reasonable; if it is so horrible for a rather generic type of plot like this, then it is probably a bad default. I was not a fan of the switch from in to out in the default, which required many other changes, but now I'm accustomed to it, and to me it looks OK here. It actually makes it a little clearer what the ticks are. What I think would be an improvement, however, would be scaling up the font sizes that are not specified directly in points to be more similar to those in the original version, given that the figure size is considerably larger than the default. You can start by using rcParams['font.size']. The default is 10, so I would try 11 and 12. And/or make the figure smaller. 8 inches square is a bit large both for screens (especially laptops) and for paper, so I would prefer a reduction. Unfortunately that would require adjusting the font specifications that are in points, and probably fiddling with some other parameters. |
On 2016/09/18 2:41 PM, Nelle Varoquaux wrote:
If it doesn't illustrate anything useful, and its value is entirely in If it does go in it must be generated with version 2 without specifying
I think you are overstating your case. But yes, we should have |
@efiring it went in the showcase section, so yes, I think it's primary goal is too look good. Some examples are horrible, but illustrate a concept or a plot, so for these, I wouldn't worry too much. |
I'm not sure we have a showcase section; I don't think I would call where this image goes a showcase. It is in the FAQ describing the parts of a figure, which is not exactly front-and-foremost unless you go looking for it. Moving it to the tutorial might be a good idea; I've seen students be mildly confused until they heard, in some general form, the layout of what is being created. Relatedly, it seems that maybe some of that text needs updating as it references things that were in the old image. |
The showcase section is here: http://matplotlib.org/gallery.html#showcase |
I think part of the tension here is that this was originally aimed at the showcase section, but I also asked @rougier to use this in the FAQ to replace the previous anatomy of a figure image. It may be that we want to have slightly different versions of the same figure in those two cases. |
My 2c but:
|
Don't look at the one above unless you want inward ticks; I have not adjusted anything for the inward ticks. The outward ticks version is in the commit and has (mostly) aligned elements. |
Ok. |
@rougier So is that an okay for the outward tick version or just a general acknowledgement of the situation? |
Some comments:
|
matplotlib.org is not TLS-capable.
I think there are some points overlaying it in white, though I thought I fixed it by adding the black edges on the scatters. I will check it more closely.
Not sure if there's an easy fix for that; I think it might be an antialiasing thing, because both ticks are the same width.
I wish it did that automatically... |
I fixed the weird dashing; it's because of the change from The title is also a little bit higher just by setting the alignment to 'bottom' instead of 'baseline'. I'm not sure if I can do anything about the ticks overlapping. |
For the tick, I think the problem comes from the aliasing. The ideal solution would be to not display the minor tick when there is a major tick but that might be too much trouble. |
Add the figure is fine for me now. |
Turns out that ax.xaxis.set_major_locator(MultipleLocator(1.000))
ax.xaxis.set_minor_locator(MultipleLocator(0.250))
ax.yaxis.set_major_locator(MultipleLocator(1.000))
ax.yaxis.set_minor_locator(MultipleLocator(0.250)) to ax.xaxis.set_major_locator(MultipleLocator(1.000))
ax.xaxis.set_minor_locator(AutoMinorLocator(4))
ax.yaxis.set_major_locator(MultipleLocator(1.000))
ax.yaxis.set_minor_locator(AutoMinorLocator(4)) |
* Enable black edges on scatter markers. Also, use `plot` instead of `scatter` for @efiring. * Move major and minor tick annotation to left side, where they're visible. * Shift tick label and axis label annotations outward to match corrected handling of tick length. * Don't disable legend frame, which is not very distracting any more. * Don't set figure facecolor, which is already white by default now. * Use AutoMinorLocator to avoid minor ticks overlaying major ticks, causing a small glitch due to antialiasing. Fixes matplotlib#7113.
plot
instead ofscatter
for @efiring.Fixes #7113.