Joint Plot#
import altair_express as alx
from vega_datasets import data
alx.jointplot(data=data.cars(),x='Miles_per_Gallon',y='Horsepower')
The jointplot() function is useful for understanding the distribution and relationship between two variables in a dataset. Using a scatterplot plot with marginal histogram plots, Jointplots assist in understanding how variables might interact.
Parameters#
- datapandas dataframe
The data to visualize as a pandas dataframe.
- xstring
The column name of the categorical series used for the x axis.
- ystring
The column name of the categorical series used for the y axis.
- colorstring
A valid CSS color to make the chart or a column name in the dataframe to color the bars by.
- widthint
The width of the chart in pixels.
- heightint
The height of the chart in pixels.
- effectsEffect Objects
The effects of interactions to be applied to the chart.
Examples#
Interactive Brush#
import altair_express as alx
from vega_datasets import data
alx.highlight_brush() + alx.jointplot(data=data.cars(),x='Miles_per_Gallon',y='Horsepower')