My data looks like this:
m=pd.DataFrame({'model':['1','1','2','2','13','13'],'rate':randn(6)},index=['0', '0','1','1','2','2'])
I want to have the x-axis of factor plot ordered in [1,2,13] but the default is [1,13,2].
Does anyone know how to change it?
Update: I think I have figured it out in the following way, but maybe there is a better way by using an index to do that?
sns.factorplot('model','rate',data=m,kind="bar",x_order=['1','2','13'])