vDataFrame.contour¶
In [ ]:
vDataFrame.contour(columns: list,
func,
nbins: int = 100,
ax=None,
**style_kwds,)
Draws the contour plot of the input function using two input vColumns.
Parameters¶
Name | Type | Optional | Description |
---|---|---|---|
columns | list | ❌ | List of the vcolumns names. The list must have two elements. |
func | str / function | ❌ | Function used to compute the contour score. It can also be a SQL expression. |
nbins | int | ✓ | Number of bins used to discretize the two input numerical vColumns. |
ax | Matplotlib axes object | ✓ | The axes to plot on. |
**style_kwds | any | ✓ | Any optional parameter to pass to the Matplotlib functions. |
In [42]:
from verticapy.datasets import load_titanic
titanic = load_titanic()
display(titanic)
In [43]:
def func(a, b):
return a + b + 1
# using Python function
titanic.contour(["parch", "sibsp"], func,)
Out[43]:
In [45]:
# using SQL
titanic.contour(["parch", "sibsp"], "EXP(parch) - EXP(sibsp + 1)",)
Out[45]:
See Also¶
vDataFrame.boxplot | Draws the Box Plot of the input vcolumns. |
vDataFrame.hist | Draws the Histogram of the input vcolumns based on an aggregation. |
vDataFrame.pivot_table | Draws the Pivot Table of vcolumns based on an aggregation. |