Reputation: 39
I was using R ggplot for data visualization, and I met the problem centering the tick labels between tick marks on x/y axes. Here's a similar question but the implementation is matplotlib.
This is what I had (the wrong version):
THANKS A LOT!!!
Upvotes: 0
Views: 1977
Reputation: 2059
It is hard to reproduce your plot without the data you used to create the plot or the code you used to generate the plot
You can move the x-axis labels to the right by adding the following code to your plot
+ theme(axis.text.x=element_text(hjust=-0.5))
Additionally, one option might be just to rotate the x-axis labels instead of moving them. You can do this by adding the following code
+ theme(axis.text.x=element_text(angle = 90))
Upvotes: 2