How to use the proplot.axes.plot._cmap_changer function in proplot

To help you get started, we’ve selected a few proplot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lukelbd / proplot / proplot / axes / base.py View on Github external
)

    # Wrapped only by cmap wrapper
    tripcolor = _cmap_changer(
        maxes.Axes.tripcolor
    )
    tricontour = _cmap_changer(
        maxes.Axes.tricontour
    )
    tricontourf = _cmap_changer(
        maxes.Axes.tricontourf
    )
    hist2d = _cmap_changer(
        maxes.Axes.hist2d
    )
    spy = _cmap_changer(
        maxes.Axes.spy
    )
    matshow = _cmap_changer(
        maxes.Axes.matshow
    )
github lukelbd / proplot / proplot / axes / base.py View on Github external
))
    streamplot = _standardize_2d(_cmap_changer(
        maxes.Axes.streamplot
    ))
    barbs = _standardize_2d(_cmap_changer(
        maxes.Axes.barbs
    ))
    imshow = _cmap_changer(
        maxes.Axes.imshow
    )

    # Wrapped only by cmap wrapper
    tripcolor = _cmap_changer(
        maxes.Axes.tripcolor
    )
    tricontour = _cmap_changer(
        maxes.Axes.tricontour
    )
    tricontourf = _cmap_changer(
        maxes.Axes.tricontourf
    )
    hist2d = _cmap_changer(
        maxes.Axes.hist2d
    )
    spy = _cmap_changer(
        maxes.Axes.spy
    )
    matshow = _cmap_changer(
        maxes.Axes.matshow
    )
github lukelbd / proplot / proplot / axes / geo.py View on Github external
GeoAxesBase.text
        )
        fill = _default_transform(GeoAxesBase.fill)
        plot = _default_transform(_plot_wrapper(_standardize_1d(
            _indicate_error(_cycle_changer(GeoAxesBase.plot))
        )))
        scatter = _default_transform(_scatter_wrapper(_standardize_1d(
            _indicate_error(_cycle_changer(GeoAxesBase.scatter))
        )))
        contour = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.contour
        )))
        contourf = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.contourf
        )))
        pcolor = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.pcolor
        )))
        pcolormesh = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.pcolormesh
        )))
        quiver = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.quiver
        )))
        streamplot = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.streamplot
        )))
        barbs = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.barbs
        )))
        tripcolor = _default_transform(_cmap_changer(
            GeoAxesBase.tripcolor
github lukelbd / proplot / proplot / axes / base.py View on Github external
    @_cmap_changer
    def parametric(
        self, *args, values=None,
        cmap=None, norm=None, interp=0,
        scalex=True, scaley=True,
        **kwargs
    ):
        """
        Draw a line whose color changes as a function of the parametric
        coordinate ``values`` using the input colormap ``cmap``.
        Invoked when you pass the `cmap` keyword argument to
        `~matplotlib.axes.Axes.plot`.

        Parameters
        ----------
        *args : (y,), (x, y), or (x, y, values)
            The coordinates. If `x` is not provided, it is inferred from `y`.
github lukelbd / proplot / proplot / axes / geo.py View on Github external
contourf = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.contourf
        )))
        pcolor = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.pcolor
        )))
        pcolormesh = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.pcolormesh
        )))
        quiver = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.quiver
        )))
        streamplot = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.streamplot
        )))
        barbs = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.barbs
        )))
        tripcolor = _default_transform(_cmap_changer(
            GeoAxesBase.tripcolor
        ))
        tricontour = _default_transform(_cmap_changer(
            GeoAxesBase.tricontour
        ))
        tricontourf = _default_transform(_cmap_changer(
            GeoAxesBase.tricontourf
        ))


class BasemapAxes(GeoAxes):
    """
    Axes subclass for plotting `~mpl_toolkits.basemap` projections. The
github lukelbd / proplot / proplot / axes / geo.py View on Github external
# Wrapped methods
    # TODO: Remove this duplication!
    # NOTE: Do not wrap fill_between because it is broken in cartopy
    if GeoAxesBase is not object:
        text = _text_wrapper(
            GeoAxesBase.text
        )
        fill = _default_transform(GeoAxesBase.fill)
        plot = _default_transform(_plot_wrapper(_standardize_1d(
            _indicate_error(_cycle_changer(GeoAxesBase.plot))
        )))
        scatter = _default_transform(_scatter_wrapper(_standardize_1d(
            _indicate_error(_cycle_changer(GeoAxesBase.scatter))
        )))
        contour = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.contour
        )))
        contourf = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.contourf
        )))
        pcolor = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.pcolor
        )))
        pcolormesh = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.pcolormesh
        )))
        quiver = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.quiver
        )))
        streamplot = _default_transform(_standardize_2d(_cmap_changer(
            GeoAxesBase.streamplot
github lukelbd / proplot / proplot / axes / base.py View on Github external
stem = _standardize_1d(_stem_wrapper(
        maxes.Axes.stem
    ))
    hlines = _standardize_1d(_hlines_wrapper(
        maxes.Axes.hlines
    ))
    vlines = _standardize_1d(_vlines_wrapper(
        maxes.Axes.vlines
    ))

    # Wrapped by cmap wrapper and standardized
    # Also support redirecting to Basemap methods
    hexbin = _standardize_1d(_cmap_changer(
        maxes.Axes.hexbin
    ))
    contour = _standardize_2d(_cmap_changer(
        maxes.Axes.contour
    ))
    contourf = _standardize_2d(_cmap_changer(
        maxes.Axes.contourf
    ))
    pcolor = _standardize_2d(_cmap_changer(
        maxes.Axes.pcolor
    ))
    pcolormesh = _standardize_2d(_cmap_changer(
        maxes.Axes.pcolormesh
    ))
    pcolorfast = _standardize_2d(_cmap_changer(
        maxes.Axes.pcolorfast  # WARNING: not available in cartopy and basemap
    ))
    quiver = _standardize_2d(_cmap_changer(
        maxes.Axes.quiver
github lukelbd / proplot / proplot / axes / base.py View on Github external
tripcolor = _cmap_changer(
        maxes.Axes.tripcolor
    )
    tricontour = _cmap_changer(
        maxes.Axes.tricontour
    )
    tricontourf = _cmap_changer(
        maxes.Axes.tricontourf
    )
    hist2d = _cmap_changer(
        maxes.Axes.hist2d
    )
    spy = _cmap_changer(
        maxes.Axes.spy
    )
    matshow = _cmap_changer(
        maxes.Axes.matshow
    )
github lukelbd / proplot / proplot / axes / geo.py View on Github external
scatter = _basemap_norecurse(_default_latlon(_scatter_wrapper(_standardize_1d(
        _indicate_error(_cycle_changer(_basemap_redirect(maxes.Axes.scatter)))
    ))))
    contour = _basemap_norecurse(_default_latlon(_standardize_2d(_cmap_changer(
        _basemap_redirect(maxes.Axes.contour)
    ))))
    contourf = _basemap_norecurse(_default_latlon(_standardize_2d(_cmap_changer(
        _basemap_redirect(maxes.Axes.contourf)
    ))))
    pcolor = _basemap_norecurse(_default_latlon(_standardize_2d(_cmap_changer(
        _basemap_redirect(maxes.Axes.pcolor)
    ))))
    pcolormesh = _basemap_norecurse(_default_latlon(_standardize_2d(_cmap_changer(
        _basemap_redirect(maxes.Axes.pcolormesh)
    ))))
    quiver = _basemap_norecurse(_default_latlon(_standardize_2d(_cmap_changer(
        _basemap_redirect(maxes.Axes.quiver)
    ))))
    streamplot = _basemap_norecurse(_default_latlon(_standardize_2d(_cmap_changer(
        _basemap_redirect(maxes.Axes.streamplot)
    ))))
    barbs = _basemap_norecurse(_default_latlon(_standardize_2d(_cmap_changer(
        _basemap_redirect(maxes.Axes.barbs)
    ))))
    hexbin = _basemap_norecurse(_standardize_1d(_cmap_changer(
        _basemap_redirect(maxes.Axes.hexbin)
    )))
    imshow = _basemap_norecurse(_cmap_changer(
        _basemap_redirect(maxes.Axes.imshow)
    ))
github lukelbd / proplot / proplot / axes / base.py View on Github external
pcolormesh = _standardize_2d(_cmap_changer(
        maxes.Axes.pcolormesh
    ))
    pcolorfast = _standardize_2d(_cmap_changer(
        maxes.Axes.pcolorfast  # WARNING: not available in cartopy and basemap
    ))
    quiver = _standardize_2d(_cmap_changer(
        maxes.Axes.quiver
    ))
    streamplot = _standardize_2d(_cmap_changer(
        maxes.Axes.streamplot
    ))
    barbs = _standardize_2d(_cmap_changer(
        maxes.Axes.barbs
    ))
    imshow = _cmap_changer(
        maxes.Axes.imshow
    )

    # Wrapped only by cmap wrapper
    tripcolor = _cmap_changer(
        maxes.Axes.tripcolor
    )
    tricontour = _cmap_changer(
        maxes.Axes.tricontour
    )
    tricontourf = _cmap_changer(
        maxes.Axes.tricontourf
    )
    hist2d = _cmap_changer(
        maxes.Axes.hist2d
    )