Linked Questions
43 questions linked to/from Rotate axis tick labels
259 votes
6 answers
424k views
Date ticks and rotation [duplicate]
I am having an issue trying to get my date ticks rotated in matplotlib. A small sample program is below. If I try to rotate the ticks at the end, the ticks do not get rotated. If I try to rotate the ...
6 votes
1 answer
23k views
How to rotate axis labels when using a matplotlib histogram? [duplicate]
I have a plot that looks like this, and I am trying to make the x axis labels more readable: This is what I tried and the error I got:
3 votes
1 answer
19k views
How do you rotate x axis tick labels in subplots? [duplicate]
I am trying to rotate the x axis labels for every subplot. Here is my code: fig.set_figheight(10) fig.set_figwidth(20) ax.set_xticklabels(dr_2012['State/UT'], rotation = 90) ax[0, 0].bar(dr_2012['...
0 votes
1 answer
8k views
How to rotate x-axis tick labels on matplotlib bar chart? Tried several approaches, none worked [duplicate]
I cannot rotate the x tick labels on a matplotlib bar chart, so those labels currently overlap. I've done some matplotlib documentation reading as well as other reading, and tried different approaches,...
0 votes
2 answers
5k views
Rotation x-ticks matplotlib [duplicate]
I can't seem to get the labels on the x-axis to rotate 90 degrees. Example df: import pandas as pd import matplotlib.pyplot as plt d = ({ 'A' : ['1','1','2','2','3','3','3'], 'B' : ['...
2 votes
1 answer
2k views
Pyplot rotated labels offset by one [duplicate]
Just getting into matplot lib and running into odd problem - I'm trying to plot 10 items, and use their names on the x-axis. I followed this suggestion and it worked great, except that my label names ...
-2 votes
2 answers
2k views
How to rotate y-axis tick labels in Pandas barplot [duplicate]
For Pandas.DataFrame plot() fn, the 'rot' keyword argument rotates the x-axis ticks specifically. So how does one rotate the y-axis ticks? There's some documentation here, which gives the anticipated ...
1 vote
1 answer
1k views
How to show xticks in vertical fashion in matplotlib python? [duplicate]
How do you have category names as the xlabel without it all squeezing together? Below is my dictionary. I actually have my keys and values mixed up due to sorting, but the code is fine. 2 : theatre ...
1 vote
1 answer
852 views
How to display all major and minor tick labels with log scale [duplicate]
I am trying to plot an xy-graph whose x-axis is logarithmic. I did that using this command: import matplotlib as plt plt.plot(X,Y) plt.xscale('log') The x-axis is logarithmic, but only values which ...
0 votes
0 answers
751 views
How to change Bar-Chart Figure Size [duplicate]
I have below code in order to create a bar chart. import matplotlib.pyplot as plt; plt.rcdefaults() import numpy as np import matplotlib.pyplot as plt objects = db.source[:5] y_pos = np.arange(len(...
0 votes
1 answer
279 views
How do I spread out the points on the x-axis? [duplicate]
The labels on the x-axis are unreadable now (they are names), I was wondering if there was a way to space them out more/make it possible to read them. my plot(i am using matplotlib on python) This is ...
3 votes
1 answer
231 views
How can I rotate axis tickmark labels if I set axis properties before making my plot? [duplicate]
I'm experimenting with seaborn and have a question about specifying axes properties. In my code below, I've taken two approaches to creating a heatmap of a matrix and placing the results on two sets ...
-1 votes
1 answer
244 views
How to make all matplotlib histogram rectangles in one color and set words written on x-axis on vertical position? [duplicate]
How can I make all histogram rectangles in one color, make certain grid as on photo, and set words written on x-axis on vertical position as on example? fig = plt.figure(figsize=(6,7)) ax = fig....
-2 votes
1 answer
151 views
Proper visualization of the label name [duplicate]
How can I properly structure the label name of the generated graph? The code used in generating the graph is written below: from sklearn.feature_selection import mutual_info_classif plt.figure(figsize=...
2 votes
1 answer
126 views
How to rotate custom xtick labels [duplicate]
I have the following line which I use to add labels to my custom cbar but I don't know how to rotate these label MyCustomBar.set_ticklabels(['< 50 \nand \ndecreasing', '< 50 \nand increasing \...