I am trying to set the limits of the x axis for different values ββfor each grant a Seaborn facetgrid distplot. I understand that I can access all axes in the subheadings through g.axes, so I tried to iterate over them and set xlim with:
g = sns.FacetGrid(mapping, col=options.facetCol, row=options.facetRow, col_order=sorted(cols), hue=options.group) g = g.map(sns.distplot, options.axis) for i, ax in enumerate(g.axes.flat): # set every-other axis for testing purposes if i % 2 == 0[enter link description here][1]: ax.set_xlim(-400,500) else: ax.set_xlim(-200,200)
However, when I do this, all axes are set to (-200, 200) not only to any other face.
What am I doing wrong?
source share