Tengo un gran problema con mis tramas marinas. Por alguna razón, los números a lo largo del eje están impresos con una fuente muy pequeña, lo que los hace ilegibles. He tratado de escalarlos con
with plt.rc_context(dict(sns.axes_style("whitegrid"), **sns.plotting_context(font_scale=5))): b = sns.violinplot(y="Draughts", data=dr) Sin ayuda, esto solo hace que el texto del eje sea más grande, pero no el número a lo largo del eje. 
La respuesta de aquí hace que las fuentes sean más grandes en seaborn ...
import pandas as pd, numpy as np, seaborn as sns from matplotlib import pyplot as plt # Generate data df = pd.DataFrame({"Draughts": np.random.randn(100)}) # Plot using seaborn sns.set(font_scale = 2) b = sns.violinplot(y = "Draughts", data = df) plt.show()Ampliando la respuesta aceptada, si solo desea cambiar la escala del tamaño de fuente de las etiquetas de marca sin escalar otras etiquetas en la misma cantidad, puede intentar esto:
import pandas as pd, numpy as np, seaborn as sns from matplotlib import pyplot as plt # Generate data df = pd.DataFrame({"Draughts": np.random.randn(100)}) # Plot using seaborn b = sns.violinplot(y = "Draughts", data = df) b.set_yticklabels(b.get_yticks(), size = 15) plt.show()
sns.set(font_scale=2) de p-robot configurará todas las fuentes de figuras . import matplotlib.pyplot as plt import seaborn as sns # data tips = sns.load_dataset("tips") # plot figure plt.figure(figsize=(8, 6)) p = sns.violinplot(x="day", y="total_bill", data=tips) # get label text _, ylabels = plt.yticks() _, xlabels = plt.xticks() plt.show() yl = list(ylabels) print(yl) >>>[Text(0, -10.0, ''), Text(0, 0.0, ''), Text(0, 10.0, ''), Text(0, 20.0, ''), Text(0, 30.0, ''), Text(0, 40.0, ''), Text(0, 50.0, ''), Text(0, 60.0, ''), Text(0, 70.0, '')] # see that there are no text labels print(yl[0].get_text()) >>> '' # see that there are text labels on the x-axis print(list(xlabels)) >>> [Text(0, 0, 'Thur'), Text(1, 0, 'Fri'), Text(2, 0, 'Sat'), Text(3, 0, 'Sun')] # the answer from Kabir Ahuja works because of this print(p.get_yticks()) >>> array([-10., 0., 10., 20., 30., 40., 50., 60., 70.]) # in this case, the following won't work because the text is '' # this is what to do if the there are text labels p.set_yticklabels(ylabels, size=15) # set the x-axis ticklabel size p.set_xticklabels(xlabels, size=5)y_text = [x.get_text() for x in ylabels] = ['', '', '', '', '', '', '', '', ''] # use p.set_yticklabels(p.get_yticks(), size=15) # or _, ylabels = plt.yticks() p.set_yticklabels(ylabels, size=15) # use p.set_xticklabels(p.get_xticks(), size=15) # or _, xlabels = plt.xticks() p.set_xticklabels(xlabels, size=15) # set the y-labels with p.set_yticklabels(p.get_yticks(), size=5) # set the x-labels with _, xlabels = plt.xticks() p.set_xticklabels(xlabels, size=5)