Linked Questions

259 votes
6 answers
424k views

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 ...
Neal's user avatar
  • 7,012
6 votes
1 answer
23k views

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:
pr338's user avatar
  • 9,230
3 votes
1 answer
19k views

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['...
queenkrazykat's user avatar
0 votes
1 answer
8k views

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,...
John's user avatar
  • 49
0 votes
2 answers
5k views

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' : ['...
user avatar
2 votes
1 answer
2k views

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 ...
kevbonham's user avatar
  • 1,040
-2 votes
2 answers
2k views

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 ...
teddy waweru's user avatar
1 vote
1 answer
1k views

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 ...
handavidbang's user avatar
1 vote
1 answer
852 views

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 ...
khashayar's user avatar
0 votes
0 answers
751 views

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(...
Behzat's user avatar
  • 95
0 votes
1 answer
279 views

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 ...
Erica Indman's user avatar
3 votes
1 answer
231 views

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 ...
fishbacp's user avatar
  • 1,263
-1 votes
1 answer
244 views

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....
Александр Демидов's user avatar
-2 votes
1 answer
151 views

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=...
toppylawz's user avatar
2 votes
1 answer
126 views

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 \...
TourEiffel's user avatar
  • 4,464

15 30 50 per page