I would like to add a y-axis showing the count value for each category within my Joyplot, along the lines of what's possible with ggplot (e.g.
Example code:
import joypy
import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
from matplotlib import cm
iris = pd.read_csv("data/iris.csv")
fig, axes = joypy.joyplot(iris)
Current output:
CodePudding user response:
joypy.joyplot can not easily be adapted. For example, the first y-tick of each subplot is used for the name. Also, a dummy subplot is used just for the common x-axis.
An alternative could be to use Seaborn which offers easier options for customization. See for example Seaborn's
Here is a somewhat similar Seaborn plot.
from matplotlib import pyplot as plt
import seaborn as sns
iris = sns.load_dataset('iris')
sns.set_style("ticks", {'axes.grid': True})
g = sns.displot(data=iris, row='species', kind='hist', x="sepal_width", height=2, aspect=3)
CodePudding user response: