[Matplotlib-users] Why are these plots different?
Elan Ernest
elch.rz at ruetz-online.de
Fri Aug 9 11:18:09 EDT 2019
The first plot uses the `jet` colormap, the second one the `viridis`
colormap. You can set the colormap via the `cmap` argument
(contourf(..., cmap="jet"))
Note however, that we (more or less strongly) discourage the use of the
jet colormap for heatmaps like this. This plot makes up a nice example
for why: The jet colormap results in "features" being seen in the data,
which aren't actually there.
For more, check
* the colormaps tutorial
(https://matplotlib.org/3.1.1/tutorials/colors/colormaps.html),
* the API change note
(https://matplotlib.org/users/dflt_style_changes.html?highlight=jet%20viridis#colormap),
* this stackoverflow question
https://stats.stackexchange.com/questions/223315/why-use-colormap-viridis-over-jet
Am 09.08.2019 um 16:54 schrieb Henry Ekene:
> 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
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20190809/a46b2108/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/a46b2108/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/a46b2108/attachment-0003.png>
More information about the Matplotlib-users
mailing list