MetPy icon indicating copy to clipboard operation
MetPy copied to clipboard

Hodograph.plot_colormapped requires units when given colors

Open dopplershift opened this issue 2 years ago • 0 comments

Right now the docs read:

        u : array_like
            u-component of wind
        v : array_like
            v-component of wind
        c : array_like
            data to use for colormapping (e.g. heights, pressure, wind speed)
        intervals: array-like, optional
            Array of intervals for c to use in coloring the hodograph.

Note, all "array-like". However, if colors is passed: https://github.com/Unidata/MetPy/blob/6ab42d1a841a5b6ca2446c9d4a714a0017c6d8c2/src/metpy/plots/skewt.py#L924-L927

there we assume intervals has units. At the very least, the docs should match the implementation.

This is different than the rest of the plotting functionality where we are unit agnostic as much as possible (this function is if you're not passing explicit levels). My inclination, then, is that this should be fixed to make the function unit agnostic.

dopplershift avatar Mar 30 '22 17:03 dopplershift