[Matplotlib-devel] [Matplotlib-users] [REL] matplotlib v2.0.0rc1

Pierre Haessig pierre.haessig at crans.org
Tue Dec 6 03:45:10 EST 2016


Le 06/12/2016 à 06:38, Thomas Caswell a écrit :
> Some of the highlights:
>  - new default styles (
> http://matplotlib.org/2.0.0rc1/users/dflt_style_changes.html  )
Very nice and useful document. I just noticed that the boxplot example
has a ylim issue: the boxes' height is tiny.

This is a proposition to change the script (dflt_style_changes-7.py)
that generate the plot:
(add seeding + cut extreme outliers)


    data = np.random.lognormal(size=(37, 4))
    fig, (old, new) = plt.subplots(ncols=2, sharey=True)
    with plt.style.context('default'):
        new.boxplot(data, labels=['A', 'B', 'C', 'D'])
        new.set_title('New boxplots')

    with plt.style.context('classic'):
        old.boxplot(data, labels=['A', 'B', 'C', 'D'])
        old.set_title('Old boxplots')

    new.set_ylim(bottom=0, top=15)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20161206/2d94ab7e/attachment.html>

More information about the Matplotlib-devel mailing list