The catplot() function allows you to create different types of plots:
Parameter name
Explanations
Type required
Example
data
table you are planning to use
DataFrame, Series, dict, array, or list of arrays
data=table
x
variable of the table for the x-axis
string corresponding to a variable of the table
x="weight"
y
variable of the table for the y-axis
string corresponding to a variable of the table
y="height"
kind
type of plot desired
string
kind="swarm"
There are several kind options that can be used:
strip
swarm
violin
box
boxen
point
bar
count
Importation Code
← Running
Cell 2
← Running
The "point" and "bar" plots display the mean along with its confidence interval. These are calculated using bootstrap resampling.
We can use the parameters of the selected plot types. For example, boxplot() has the fill parameter, so we can specify it directly in the catplot() function.