I would like to invert the y-axis in each plot of a Facetgrid.
Below you find a reduced example of the code:
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
df_test = pd.DataFrame({'a':['yes', 'no']*5, 'b':np.arange(10), 'c':np.arange(10)*2})
plt.figure()
g = sns.FacetGrid(data=df_test, row='a')
g.map_dataframe(sns.scatterplot, y='c', x='b')
plt.show()
As far as I know, this is normally done with ax.invert_yaxis()
when using matplotlib, so I tried to access it through g.axes
but had no luck.
I am aware that I can manually set a ylim=(max_val, min_val)
, however, this results in unsightly tick spacing.