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

Method ohlc

hvplot/plotting/core.py:553–600  ·  view source on GitHub ↗

The `ohlc` plot visualizes the open, high, low and close prices of stocks and other assets. Reference: https://hvplot.holoviz.org/ref/api/manual/hvplot.hvPlot.ohlc.html Plotting options: https://hvplot.holoviz.org/ref/plotting_options/index.html Parameters

(self, x=None, y=None, **kwds)

Source from the content-addressed store, hash-verified

551 return self(x, y, kind='errorbars', yerr1=yerr1, yerr2=yerr2, **kwds)
552
553 def ohlc(self, x=None, y=None, **kwds):
554 """
555 The `ohlc` plot visualizes the open, high, low and close prices of stocks and other assets.
556
557 Reference: https://hvplot.holoviz.org/ref/api/manual/hvplot.hvPlot.ohlc.html
558
559 Plotting options: https://hvplot.holoviz.org/ref/plotting_options/index.html
560
561 Parameters
562 ----------
563 x : string, optional
564 Field name to draw x coordinates from. If not specified, the index is used. Normally
565 refers to date values.
566 y : list or tuple, optional
567 Field names of the OHLC fields. Default is ["open", "high", "low", "close"]
568 bar_width: number, optional
569 Bar width. Default is 0.5.
570 line_color : string, optional
571 The line color. Default is black
572 pos_color : string, optional
573 The color indicating a positive change. Default is green.
574 neg_color : string, optional
575 The color indicating a negative change. Default is red.
576 **kwds : optional
577 Additional keywords arguments are documented in :ref:`plot-options`.
578 Run ``hvplot.help('ohlc')`` for the full method documentation.
579
580 Returns
581 -------
582 :class:`holoviews:holoviews.element.Rectangles` / Panel object
583 You can `print` the object to study its composition and run:
584
585 .. code-block::
586
587 import holoviews as hv
588 hv.help(the_holoviews_object)
589
590 to learn more about its parameters and options.
591
592 References
593 ----------
594
595 - Bokeh: https://docs.bokeh.org/en/latest/docs/examples/topics/timeseries/candlestick.html
596 - Matplotlib: https://www.statology.org/matplotlib-python-candlestick-chart/
597 - Plotly: https://plotly.com/python/ohlc-charts/
598 - Wikipedia: https://en.wikipedia.org/wiki/Candlestick_chart
599 """
600 return self(kind='ohlc', x=x, y=y, **kwds)
601
602 def heatmap(self, x=None, y=None, C=None, colorbar=True, logz=False, **kwds):
603 """

Callers 5

test_ohlc_hover_colsFunction · 0.45
test_ohlc_hover_cols_allFunction · 0.45

Calls

no outgoing calls

Tested by 5

test_ohlc_hover_colsFunction · 0.36
test_ohlc_hover_cols_allFunction · 0.36