MCPcopy Create free account
hub / github.com/holoviz/hvplot / step

Method step

hvplot/plotting/core.py:320–382  ·  view source on GitHub ↗

The `step` plot connects the points with piece-wise constant curves. The `step` plot can be used pretty much anytime the `line` plot might be used, and has many of the same options available. Reference: https://hvplot.holoviz.org/ref/api/manual/hvplot.hvPlot.step.h

(self, x=None, y=None, where='mid', **kwds)

Source from the content-addressed store, hash-verified

318 return self(x, y, kind='line', **kwds)
319
320 def step(self, x=None, y=None, where='mid', **kwds):
321 """
322 The `step` plot connects the points with piece-wise constant curves.
323
324 The `step` plot can be used pretty much anytime the `line` plot might be used, and has many
325 of the same options available.
326
327 Reference: https://hvplot.holoviz.org/ref/api/manual/hvplot.hvPlot.step.html
328
329 Plotting options: https://hvplot.holoviz.org/ref/plotting_options/index.html
330
331 Parameters
332 ----------
333 x : string, optional
334 Field name(s) to draw x-positions from. If not specified, the index is
335 used. Must refer to continuous data. Not categorical data.
336 y : string or list, optional
337 Field name(s) to draw y-positions from. If not specified, all numerical
338 fields are used.
339 by : string, optional
340 A single field or list of fields to group by. All the subgroups are visualized.
341 groupby: string, list, optional
342 A single field or list of fields to group and filter by. Adds one or more widgets to
343 select the subgroup(s) to visualize.
344 where: string, optional
345 Controls the transition point of the step along the x-axis. One of
346 ``'mid'``, ``'pre'``, ``'post'``. Default is ``'mid'``.
347 color : str or array-like, optional.
348 The color for each of the series. Possible values are:
349
350 A single color string referred to by name, RGB or RGBA code, for instance 'red' or
351 '#a98d19.
352
353 A sequence of color strings referred to by name, RGB or RGBA code, which will be used
354 for each series recursively. For instance ['green','yellow'] each field's line will be
355 filled in green or yellow, alternatively. If there is only a single series to be
356 plotted, then only the first color from the color list will be used.
357 **kwds : optional
358 Additional keywords arguments are documented in :ref:`plot-options`.
359 Run ``hvplot.help('step')`` for the full method documentation.
360
361 Returns
362 -------
363 :class:`holoviews:holoviews.element.Curve` / Panel object
364 You can `print` the object to study its composition and run:
365
366 .. code-block::
367
368 import holoviews as hv
369 hv.help(the_holoviews_object)
370
371 to learn more about its parameters and options.
372
373 References
374 ----------
375
376 - Bokeh: https://docs.bokeh.org/en/latest/docs/reference/models/glyphs/step.html
377 - HoloViews: https://holoviews.org/gallery/demos/bokeh/step_chart.html

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected