Hi,

I'm producing some plots using the Toolbox function geomap:

fig = ct.cdsplot.geomap(data)


How do I manually set the data range (e.g. max,min values) shown on the output map? e.g say I wanted the range in the following image to be 40 degC to -40degC :


Thanks,

Kevin

2 Comments

  1. Hi Kevin,

    To define the data range you can use the 'pcolormesh_kwargs' keyword argument where you can include any keyword argument supported by the xarray pcolormesh function (http://xarray.pydata.org/en/stable/generated/xarray.plot.pcolormesh.html).

    In your case you could use:

    fig = ct.cdsplot.geomap(
        data,
        pcolormesh_kwargs={
            'cmap':'RdBu_r',
            'vmin': -40.,
            'vmax': 40.
        }
    )

    I hope that helps.

    Vivien


  2. Thanks Vivien - that is very helpful!

    Kevin