The plotting method: `df.hvplot(...)` creates a plot similarly to the familiar Pandas `df.plot` method. For more detailed options use a specific plotting method, e.g. `df.hvplot.line`. Reference: https://hvplot.holoviz.org/ref/api/index.html Plotting options: https://hvplot.h
| 1631 | |
| 1632 | |
| 1633 | class hvPlot(hvPlotTabular): |
| 1634 | """ |
| 1635 | The plotting method: `df.hvplot(...)` creates a plot similarly to the familiar Pandas |
| 1636 | `df.plot` method. |
| 1637 | |
| 1638 | For more detailed options use a specific plotting method, e.g. `df.hvplot.line`. |
| 1639 | |
| 1640 | Reference: https://hvplot.holoviz.org/ref/api/index.html |
| 1641 | |
| 1642 | Plotting options: https://hvplot.holoviz.org/ref/plotting_options/index.html |
| 1643 | |
| 1644 | Parameters |
| 1645 | ---------- |
| 1646 | x : string, optional |
| 1647 | Field name(s) to draw x-positions from. If not specified, the index is |
| 1648 | used. |
| 1649 | y : string or list, optional |
| 1650 | Field name(s) to draw y-positions from. If not specified, all numerical |
| 1651 | fields are used. |
| 1652 | kind : string, optional |
| 1653 | The kind of plot to generate, e.g. 'area', 'bar', 'line', 'scatter' etc. To see the |
| 1654 | available plots run `print(df.hvplot.__all__)`. |
| 1655 | **kwds : optional |
| 1656 | Additional keywords arguments are documented in :ref:`plot-options`. |
| 1657 | |
| 1658 | Returns |
| 1659 | ------- |
| 1660 | A Holoviews object. You can `print` the object to study its composition and run `hv.help` on |
| 1661 | the object to learn more about its parameters and options. |
| 1662 | |
| 1663 | Examples |
| 1664 | -------- |
| 1665 | |
| 1666 | .. code-block:: |
| 1667 | |
| 1668 | import hvplot.pandas |
| 1669 | import pandas as pd |
| 1670 | |
| 1671 | df = pd.DataFrame( |
| 1672 | { |
| 1673 | "actual": [100, 150, 125, 140, 145, 135, 123], |
| 1674 | "forecast": [90, 160, 125, 150, 141, 141, 120], |
| 1675 | "numerical": [1.1, 1.9, 3.2, 3.8, 4.3, 5.0, 5.5], |
| 1676 | "date": pd.date_range("2022-01-03", "2022-01-09"), |
| 1677 | "string": ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], |
| 1678 | }, |
| 1679 | ) |
| 1680 | line = df.hvplot.line( |
| 1681 | x="numerical", |
| 1682 | y=["actual", "forecast"], |
| 1683 | ylabel="value", |
| 1684 | legend="bottom", |
| 1685 | height=500, |
| 1686 | color=["steelblue", "teal"], |
| 1687 | alpha=0.7, |
| 1688 | line_width=5, |
| 1689 | ) |
| 1690 | line |
no outgoing calls
searching dependent graphs…