MCPcopy
hub / github.com/pydata/xarray / newplotfunc

Function newplotfunc

xarray/plot/dataset_plot.py:163–316  ·  view source on GitHub ↗
(
        ds: Dataset,
        *args: Any,
        x: Hashable | None = None,
        y: Hashable | None = None,
        u: Hashable | None = None,
        v: Hashable | None = None,
        hue: Hashable | None = None,
        hue_style: HueStyleOptions = None,
        row: Hashable | None = None,
        col: Hashable | None = None,
        col_wrap: int | Literal["auto"] | None = None,
        ax: Axes | None = None,
        figsize: Iterable[float] | None = None,
        size: float | None = None,
        aspect: AspectOptions = None,
        sharex: bool = True,
        sharey: bool = True,
        add_guide: bool | None = None,
        subplot_kws: dict[str, Any] | None = None,
        cbar_kwargs: dict[str, Any] | None = None,
        cbar_ax: Axes | None = None,
        cmap: str | Colormap | None = None,
        vmin: float | None = None,
        vmax: float | None = None,
        norm: Normalize | None = None,
        infer_intervals: bool | None = None,
        center: float | None = None,
        robust: bool | None = None,
        colors: str | ArrayLike | None = None,
        extend: ExtendOptions = None,
        levels: ArrayLike | None = None,
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

161 plotfunc, assigned=("__module__", "__name__", "__qualname__", "__doc__")
162 )
163 def newplotfunc(
164 ds: Dataset,
165 *args: Any,
166 x: Hashable | None = None,
167 y: Hashable | None = None,
168 u: Hashable | None = None,
169 v: Hashable | None = None,
170 hue: Hashable | None = None,
171 hue_style: HueStyleOptions = None,
172 row: Hashable | None = None,
173 col: Hashable | None = None,
174 col_wrap: int | Literal["auto"] | None = None,
175 ax: Axes | None = None,
176 figsize: Iterable[float] | None = None,
177 size: float | None = None,
178 aspect: AspectOptions = None,
179 sharex: bool = True,
180 sharey: bool = True,
181 add_guide: bool | None = None,
182 subplot_kws: dict[str, Any] | None = None,
183 cbar_kwargs: dict[str, Any] | None = None,
184 cbar_ax: Axes | None = None,
185 cmap: str | Colormap | None = None,
186 vmin: float | None = None,
187 vmax: float | None = None,
188 norm: Normalize | None = None,
189 infer_intervals: bool | None = None,
190 center: float | None = None,
191 robust: bool | None = None,
192 colors: str | ArrayLike | None = None,
193 extend: ExtendOptions = None,
194 levels: ArrayLike | None = None,
195 **kwargs: Any,
196 ) -> Any:
197 if args:
198 # TODO: Deprecated since 2022.10:
199 msg = "Using positional arguments is deprecated for plot methods, use keyword arguments instead."
200 assert x is None
201 x = args[0]
202 if len(args) > 1:
203 assert y is None
204 y = args[1]
205 if len(args) > 2:
206 assert u is None
207 u = args[2]
208 if len(args) > 3:
209 assert v is None
210 v = args[3]
211 if len(args) > 4:
212 assert hue is None
213 hue = args[4]
214 if len(args) > 5:
215 raise ValueError(msg)
216 else:
217 warnings.warn(msg, FutureWarning, stacklevel=2)
218 del msg
219 del args
220

Callers

nothing calls this directly

Calls 9

_infer_meta_dataFunction · 0.90
_easy_facetgridFunction · 0.90
get_axisFunction · 0.90
_add_colorbarFunction · 0.90
_title_for_sliceMethod · 0.80
copyMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…