Change axis labels after drawing scripting on FacetGrid

My graph is shown below and my code is here

g = sns.FacetGrid(teacherValueFinal3, row='Grade Level', col='Course',margin_titles=True)
g1=g.set_titles("gg")
g1.map(sns.violinplot, '2013-2014 Assessment Score', 'Gender', color="RdBu")

enter image description here

It seems that by default the maritime value should select the first variable that appears in the function mapas x axis. However, for the voilinplotargument groupbymust be placed second. Is there a way to invert the axis labels by default, namely Genderon x axisand 2013 - 2014 assessment scoreson y axis?

+4
source share
1 answer

The API violinplotworks fine with FacetGrid, but it can be fixed after plotting:

g = sns.FacetGrid(teacherValueFinal3, row='Grade Level', col='Course',margin_titles=True)
g.map(sns.violinplot, '2013-2014 Assessment Score', 'Gender', color="RdBu")
g.set_axis_labels('Gender', '2013-2014 Assessment Score')
+6
source

All Articles