I am working with the FacetGrid
example presented here that results in the plot below. In my data set, there is quite a lot of plots, and it would be convenient to have the x
axis labels repeated for each facet, not only at the bottom.
For this example, the values 62, ..., 76
should be repeated for each of the A-J
facets.
FacetGrid object takes a dataframe as input and the names of the variables that will form the row, column, or hue dimensions of the grid. The variables should be categorical and the data at each level of the variable will be used for a facet along that axis.
FacetGrid() : FacetGrid class helps in visualizing distribution of one variable as well as the relationship between multiple variables separately within subsets of your dataset using multiple panels.
Plot the rectangular data as a color-encoded matrix. Use tick_params() for changing the appearance of ticks and tick labels. Use left=false and bottom=false to remove the tick marks.
The answer by Bazingaa works for matplotlib version 2.0.2. For newer versions of matplotlib, using ax.tick_params()
and setting labelbottom=True
seems to work:
for ax in g.axes.flatten():
ax.tick_params(labelbottom=True)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With