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

Method area

hvplot/plotting/core.py:454–502  ·  view source on GitHub ↗

The `area` plot can be used to color the area under a line or to color the space between two lines. Reference: https://hvplot.holoviz.org/ref/api/manual/hvplot.hvPlot.area.html Plotting options: https://hvplot.holoviz.org/ref/plotting_options/index.html Pa

(self, x=None, y=None, y2=None, stacked=True, **kwds)

Source from the content-addressed store, hash-verified

452 return self(x, y, kind='scatter', **kwds)
453
454 def area(self, x=None, y=None, y2=None, stacked=True, **kwds):
455 """
456 The `area` plot can be used to color the area under a line or to color the space between two
457 lines.
458
459 Reference: https://hvplot.holoviz.org/ref/api/manual/hvplot.hvPlot.area.html
460
461 Plotting options: https://hvplot.holoviz.org/ref/plotting_options/index.html
462
463 Parameters
464 ----------
465 x : string, optional
466 Field name(s) to draw x-positions from. If not specified, the index is
467 used. Can refer to continuous and categorical data.
468 y : string, optional
469 Field name to draw the first y-position from
470 y2 : string, optional
471 Field name to draw the second y-position from
472 stacked : boolean, optional
473 Whether to stack multiple areas. Default is True.
474 **kwds : optional
475 Additional keywords arguments are documented in :ref:`plot-options`.
476 Run ``hvplot.help('area')`` for the full method documentation.
477
478 Returns
479 -------
480 :class:`holoviews:holoviews.element.Area` / Panel object
481 You can `print` the object to study its composition and run:
482
483 .. code-block::
484
485 import holoviews as hv
486 hv.help(the_holoviews_object)
487
488 to learn more about its parameters and options.
489
490 References
491 ----------
492
493 - Bokeh: https://docs.bokeh.org/en/latest/docs/user_guide/basic/areas.html#directed-areas
494 - HoloViews: https://holoviews.org/reference/elements/matplotlib/Area.html
495 - Pandas: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.plot.area.html
496 - Plotly: https://plotly.com/python/filled-area-plots/
497 - Matplotlib: https://matplotlib.org/stable/gallery/lines_bars_and_markers/fill_between_demo.html
498 - Wiki: https://en.wikipedia.org/wiki/Area_chart
499 """
500 if 'alpha' not in kwds and not stacked:
501 kwds['alpha'] = 0.5
502 return self(x, y, y2=y2, kind='area', stacked=stacked, **kwds)
503
504 def errorbars(self, x=None, y=None, yerr1=None, yerr2=None, **kwds):
505 """

Callers 1

test_area_stackedMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_area_stackedMethod · 0.36