Skip to content

Contour plot color not encoded with Maplotlib #1668

@maximlt

Description

@maximlt

It works if c/color is set to 'air' but that shouldn't be required.

import hvplot.xarray # noqa
hvplot.extension('matplotlib')

ds = hvplot.sampledata.air_temperature('xarray').sel(time='2014-02-25 12:00')

p = ds.hvplot.contour(
    x='lon',
    y='lat',
    z='air',
    # c='air',
    levels=list(range(240, 300, 5)),
    cmap='plasma_r',
    linewidth=1.2,
    data_aspect=1,
    width=700,
    clabel='Air Temperature (K)',
    title='Contour Plot (Matplotlib)',
)
p
Image

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions