Viridis is in the `cm` submodule.

from matplotlib import cm
cmap = cm.viridis

On Mon, Apr 25, 2016 at 6:24 PM, Sudheer Joseph <sudheer.jos...@yahoo.com>
wrote:

> Hi Paul,
>
> I tried to get the new colormap suggestion from you but could not get the
> colormap package. Where can I get it? google search did not took me to the
> package/
> Is it a development package?
>  May I know how to use  viridis color map  with an example plot?
>
>
> Below is an example code from the link you send
>
> '''
> For each colormap, plot the lightness parameter L* from CIELAB colorspace
> along the y axis vs index through the colormap. Colormaps are examined in
> categories as in the original matplotlib gallery of colormaps.
> '''
>
> from colormaps import cmaps
> import numpy as np
> import matplotlib.pyplot as plt
> from matplotlib import cm
> import matplotlib as mpl
> from colorspacious import cspace_converter
>
>
>
> *************************************************************** Sudheer
> Joseph         Indian National Centre for Ocean Information Services
> Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla
> P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 Tel:
> +91-40-23886047(O),Fax:+91-40-23895011(O), 
> Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile)
> E-mail:sjo.in...@gmail.com;sudheer.jos...@yahoo.com Web-
> http://oppamthadathil.tripod.com
> ***************************************************************
>
> --------------------------------------------
> On Mon, 25/4/16, Paul Hobson <pmhob...@gmail.com> wrote:
>
>  Subject: Re: [Matplotlib-users] subplot layout
>  To: "Sudheer Joseph" <sudheer.jos...@yahoo.com>
>  Cc: "Matplotlib Users" <matplotlib-users@lists.sourceforge.net>
>  Date: Monday, 25 April, 2016, 4:33 PM
>
>  Your
>  basemap plot is likely setting the aspect of the axes to
>  "equal", so it resizes the plot accordingly.
>  Otherwise you'd have a pretty nasty amount of vertical
>  distortion.
>  When you save
>  the figure, using bbox_inches='tight' will trim the
>  excess white space from the
>  margins:fig.savefig('map_and_bars.png',
>  dpi=600, bbox_inches='tight')
>  Also, you should try the new viridis
>  color map :)
> http://matplotlib.org/users/colormaps.html?highlight=colormaps#miscellaneous
>
>
>
>  On Mon, Apr 25, 2016 at
>  9:05 AM, Sudheer Joseph <sudheer.jos...@yahoo.com>
>  wrote:
>  Hi,
>
>             I am looking for a layout as seen in the
>  empty layout attached which is produced using
>
>  figsize(20,8),subplot(1,2,1);subplot(222);subplot(224)
>
>
>
>  However when I use it for getting attached second figure the
>  layout gets modified as seen in attached figure 2.
>
>  fig = p.figure(figsize=(20,8))
>
>  ax=p.subplot(121)
>
>  ax1=p.subplot(222)
>
>  ax2=p.subplot(224)
>
>
>
>  Can any one suggest a way to get figure exactly as the empty
>  layout?
>
>
>
>  With best regards,
>
>  Sudheer
>
>
>
>  ***************************************************************
>  Sudheer Joseph         Indian National Centre for Ocean
>  Information Services Ministry of Earth Sciences, Govt. of
>  India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi
>  Nagar,Kukatpally, Hyderabad; Pin:5000 55
>  Tel:+91-40-23886047(O),Fax:+91-40-23895011(O),
>  Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile)
> E-mail:sjo.in...@gmail.com;sudheer.jos...@yahoo.com
>  Web- http://oppamthadathil.tripod.com
>  ***************************************************************
>
>  
> ------------------------------------------------------------------------------
>
>  Find and fix application performance issues faster with
>  Applications Manager
>
>  Applications Manager provides deep performance insights into
>  multiple tiers of
>
>  your business applications. It resolves application problems
>  quickly and
>
>  reduces your MTTR. Get your free trial!
>
>  https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
>  _______________________________________________
>
>  Matplotlib-users mailing list
>
>  Matplotlib-users@lists.sourceforge.net
>
>  https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
>
>
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to