-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
boxplot does not take parameters into account #3042
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
Comments
@phobson can you take a look at this? |
Confirmed. To get what @Carreau needs, you have to do: %matplotlib inline
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
bp = ax.boxplot(np.random.normal(size=500), flierprops=dict(marker='o', markerfacecolor='r', markeredgecolor='k')) I have an idea for a fix. Should be simple. |
@Carreau Just curious: are the changed defaults better, in your opinion. Aesthetics aside, should we have kept them the same? |
Defaults should not have changed (and the tests should have caught them if they did). Changing defaults is considered a major API break. |
I am no designer, and I wouldn't even follow my own decision. But full recognizable Matplotlib theme would be nice. |
Restoring the default symbolgy is easy, though I'm not sure I agree it's necessary. I fully understand that the change was technically a bug and why that's the case. But the old style is just so...ugly. (@tacaswell the tests didn't catch it b/c i updated the test images to the new default style -- so yeah, mea culpa) Reading the |
It needs to be fixed. I should have caught that you did that when I merged it. The "it's ugly" position is one that has been taken before (and is what inspired (in part) the creation of prettyplot, seaborn, and ggplot). The problem is that if you change the defaults you break someones code and that even if we agreed to change the defaults, the only thing we all agree on is that we don't like the current defaults and it just turns into a flame war. I think the solution is something along the lines of the rcparam stylesheets that @tonysyu has been working on and/or my rcparam refactor proposal ( #2637 ). |
Yeah. I have witnessed and totally understand that. With the default style being the low-hanging fruit here, expect that PR first. |
Agreed that its ugly but that we should not change default. Related to #2637 I made something along as an experiement that rely on metaclass and make all artist configurable based on their class name. It also show my bad design skills. |
Just for posterity, I'd like to put my oar in and say that avoiding all change is not only impossible, but also undesirable. If a package gets too scared to change defaults (where reasonable, infrequent, and easy to revert) is in its death throws (sorry numpy) which is not an aspiration I have for mpl. That said, the "ugly" argument can be fixed in other ways (style-sheets for instance) and we should perhaps be focusing on more of those. In this case though, I agree with @tacaswell et al. - let's revert the default values. 👍 |
I supposed that's why version number have major-minor-patch :-) |
@Carreau Is the 0 vs 1 a big deal? |
(sorry, wrong button) |
Oh, I haven't even see the 0 vs one change on X axis. I tend to position the boxplot myself, so I don't care. But I suppose people might be relying on it, so I would consider it API change. |
And default style is changed.
Here is ho I used to have boxplot on matplotlib python 2

recent version on python 3 look different and seem not to take into account parameters passed to it.
Plot generated with
(yes I know pylab is wrong)
git-desribe in mpl repo before a
python3 setup install
givesv1.3.1rc2-1231-gef462e4
My github foo did not show similar issues.
The text was updated successfully, but these errors were encountered: