[Matplotlib-users] Why are these plots different?

Bruno Pagani bruno.pagani at astrophysics.eu
Fri Aug 9 11:00:08 EDT 2019


Hi,

Le 09/08/2019 à 16:54, Henry Ekene a écrit :
> Hello, Matplotlib Users,
>
> My challenge is that I saw this below image somewhere 
> Screenshot from 2019-08-09 15-24-34.pngand i decided to reproduce it
> using the same matplotlib codes but it turned out that my own image
> appear different as can be seen below 
> Screenshot from 2019-08-09 15-28-38.pngPlease why is mine different in
> color, and what can I do to get the exact image as the other one?
> Thanks for your help.
>
> Henry

You use a different version of matplotib than whoever made the first
one. Lots of things have changed regarding defaults, including colormap.
You are using the “new” viridis colormap, the plot above looks like jet.

This is not the only difference between the two plots (look at e.g.
ticks direction, spine…). To reproduce the old plot, the easiest would
be to use the classic stylesheet of matplotlib with
`plt.style.use("classic")`, to be added after importing matplotlib.

Regards,
Bruno

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20190809/0a49e0d8/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2019-08-09 15-24-34.png
Type: image/png
Size: 102136 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20190809/0a49e0d8/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2019-08-09 15-28-38.png
Type: image/png
Size: 53320 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20190809/0a49e0d8/attachment-0003.png>


More information about the Matplotlib-users mailing list