Python seaborn catplot - How do I change the y-axis scale to percentage
问题 In the figure the y-axis labels are in decimals from (0 to 1) i.e (0.1, 0.2, 0.4 etc). How can I convert this into a % format (10%, 20%, 40% etc). Just 10, 20, 40 also will do. Thanks, John g = sns.catplot(x="who", y="survived", col="class", ... data=titanic, saturation=.5, ... kind="bar", ci=None, aspect=.6) 回答1: You may use a PercentFormatter on the axes of the grid. import seaborn as sns import matplotlib.pyplot as plt from matplotlib.ticker import PercentFormatter titanic = sns.load