0

sns.set_style("white")
g =sns.lmplot(x="diet_19", y="Se_inv_19", hue="taxa", data=Data, markers= 
["o","v","s","*","P","x"]);

###for Axes


plt.ylim(-5, 15)
plt.xlim(-0.5, 15)
plt.xlabel('diet_19',fontsize=18)
plt.ylabel('Se_inv_19',fontsize=18)
plt.title('Diet Vs Se in different taxa', fontsize=20)

###for Axes tick mark labels


for axes in g.axes.flat:
    _ = axes.set_xticklabels(axes.get_xticklabels(), fontsize = 16)
for axes in g.axes.flat:
    _ = axes.set_yticklabels(axes.get_yticklabels(), fontsize = 16)

###for the legend,

Already legend is coming outside of the plot, but I want to change the font size of text (basically 5 taxa names) and title

Thank you in advance for your kind help. Banamali

  • you are specifying the font size of all the text I can tell from your code, are you saying there is a legend that is too small? what is creating the legend I see nothing about it in your shared code. – Tadhg McDonald-Jensen Sep 19 '21 at 20:40
  • Yes there is a legend where font sizes are small, I need to improve it. I did not write any code for the legend plot. – Banamali Panigrahi Sep 20 '21 at 22:40
  • I got a link where someone written like this, but I dont understand how to write it in sns.lm plot . https://stackoverflow.com/questions/50201227/how-to-increase-the-font-size-of-the-legend-in-my-seaborn-factorplot-facetgrid ##g = FacetGrid( ... )## ##for ax in g.axes.flat: plt.setp(ax.get_legend().get_texts(), fontsize=22) # for legend text plt.setp(ax.get_legend().get_title(), fontsize=32) # for legend title## – Banamali Panigrahi Sep 20 '21 at 22:54

0 Answers0