I have the following code:
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import os
import matplotlib.font_manager as font_manager
import sys
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
path = os.getcwd() + "/results/"
sns.set_theme(style="whitegrid")
df = pd.read_csv("C:/tmp/all2.txt")
ax = sns.boxplot(x="cluster", y="val",
hue="type", palette=["k", "w"],
data=df,showfliers = False)
#sns.despine(ax=ax, trim=True, offset={'left':1,'right':1,'top':1,'bottom':1})
ax.set(ylabel='Number', xlabel='Clustered profiles')
font = font_manager.FontProperties(family='sans-serif',
weight='bold',
style='normal')
plt.legend(loc='best', frameon=False, prop=font)
plt.legend(loc='best', frameon=False, prop=font)
plt.xticks(weight='bold', fontname='sans-serif')
plt.yticks(weight='bold', fontname='sans-serif')
plt.xlabel("Clustered profiles", weight='bold', fontname='sans-serif', size=14)
plt.tight_layout()
plt.savefig(path + "/myoutput.pdf", dpi=250, transparent=False, bbox_inches='tight', format="pdf")
I'm getting following output:
I'm trying to enlarge my output because not all labels can be read; I'm unsure how to do it. I tried to use a higher dpi, but it didn't help me. What am I missing?