Home > Back-end >  how to set x_axis label(not xtick label) for all subplots in relplot?
how to set x_axis label(not xtick label) for all subplots in relplot?

Time:12-20

I tried drawing subplot through relplot method of seaborn. Now the question is, due to the original dataset is varying, sometimes I don't know how much final subplots will be.

I set col_wrap to limit it, but sometimes the results looks not so good. For example, I set col_wrap = 3, while there are 5 subplots as below:

enter image description here

As the figure shows, the x_axis only occurs in the C D E, which seems strange. I want x axis label is shown in all subplots(from A to E).

Now I already know that facet_kws={'sharex': 'col'} allows plots to have independent axis scales(according to seaborn facetgrid, adding inner xlabel and ylabel

  • Related