[Matplotlib-users] default cmap in ver. 2.0

Benjamin Root ben.v.root at gmail.com
Thu Jan 19 16:32:02 EST 2017


Ok, then try this to find out what config file is being used:

import matplotlib
print(matplotlib.matplotlib_fname())

Ben Root


On Thu, Jan 19, 2017 at 4:19 PM, Slavin, Jonathan <jslavin at cfa.harvard.edu>
wrote:

> Hi Ben,
>
> It's definitely picking up the new matplotlib since many defaults for
> plotting, e.g. the line color cycle, tick direction, are changed.  It's
> really just the default colormap that's apparently unchanged.
>
> Jon
>
> On Thu, Jan 19, 2017 at 4:09 PM, Benjamin Root <ben.v.root at gmail.com>
> wrote:
>
>> in situations like this, the most common reason is that you aren't
>> actually loading the matplotlib you think you are running. I would
>> double-check by doing:
>>
>> import matplotlib
>> print(matplotlib.__version__)
>>
>> Another trick I use is to type: "pydoc matplotlib" and see what it picked
>> up.
>>
>> Ben Root
>>
>> On Thu, Jan 19, 2017 at 4:05 PM, Slavin, Jonathan <
>> jslavin at cfa.harvard.edu> wrote:
>>
>>> Hi all,
>>>
>>> I just installed matplotlib 2.0.  I was surprised that when I created an
>>> image plot using imshow I had the same old jet colormap instead of
>>> viridis.  I looked in my ~/.confg/matplotlib/matplotlibrc file and the
>>> image.cmap line was commented out, so that didn't seem to be the problem.
>>> Just to be sure, I moved that one aside and copied the new one under the
>>> matplotlib distribution to its place (which also has that line commented
>>> out).  I still get the same result.  Obviously I can fix this either by
>>> uncommenting that line or by specifying the cmap in calls to imshow.  But
>>> I'm curious, where are those defaults stored?
>>>
>>> Regards,
>>> Jon
>>>
>>> --
>>> ________________________________________________________
>>> Jonathan D. Slavin                 Harvard-Smithsonian CfA
>>> jslavin at cfa.harvard.edu       60 Garden Street, MS 83
>>> phone: (617) 496-7981       Cambridge, MA 02138-1516
>>> cell: (781) 363-0035             USA
>>> ________________________________________________________
>>>
>>>
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Matplotlib-users at python.org
>>> https://mail.python.org/mailman/listinfo/matplotlib-users
>>>
>>>
>>
>
>
> --
> ________________________________________________________
> Jonathan D. Slavin                 Harvard-Smithsonian CfA
> jslavin at cfa.harvard.edu       60 Garden Street, MS 83
> phone: (617) 496-7981       Cambridge, MA 02138-1516
> cell: (781) 363-0035             USA
> ________________________________________________________
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20170119/6be78f03/attachment.html>


More information about the Matplotlib-users mailing list