vDataFrame.plot¶
In [ ]:
vDataFrame.plot(ts: str,
columns: list = [],
start_date: (str, datetime.datetime, datetime.date, float,) = "",
end_date: (str, datetime.datetime, datetime.date, float,) = "",
step: bool = False,
ax=None,
**style_kwds,)
Draws a time series plot.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
ts | str | ❌ | The time series vcolumn of type date (date, datetime, timestamp, etc.) or numeric used to order the data. |
columns | list | ✓ | List of the vcolumns names. If empty, all the numerical vcolumns will be used. |
start_date | str / date / float | ✓ | Input Start Date. For example, time = '03-11-1993' will filter the data when 'ts' is lesser than November 1993 the 3rd. |
end_date | str / date / float | ✓ | Input End Date. For example, time = '03-11-1993' will filter the data when 'ts' is greater than November 1993 the 3rd. |
step | bool | ✓ | If set to True, draw a Step Plot. |
ax | Matplotlib axes object | ✓ | The axes to plot on. |
**style_kwds | any | ✓ | Any optional parameter to pass to the Matplotlib functions. |
In [1]:
from verticapy.datasets import load_amazon
amazon = load_amazon()
display(amazon)
In [3]:
# Regular Plot
amazon[amazon["state"] == "ACRE"].plot(ts = "date",
columns = ["number"],
step = False)
Out[3]:
In [4]:
# Step Plot
amazon[amazon["state"] == "ACRE"].plot(ts = "date",
columns = ["number"],
step = True)
Out[4]:
See Also¶
| vDataFrame[].plot | Draws the Time Series of one vcolumn. |
