crosoffice.blogg.se

Matplotlib python rename x label
Matplotlib python rename x label








matplotlib python rename x label

matplotlib python rename x label

I have come across a few other posts related to this issue, but not seen one that specifically addresses the renaming of individual labels. Spacing in points from the axes bounding box including ticks and tick. This is the error I get when using the above code.ĪttributeError: 'Series' object has no attribute 'set_ylabel' labelpad : scalar, optional, default: None. I have tried to rename the x-axis labels using the code below. Pd.set_option('display.mpl_style', 'default')įixed_data = pd.read_csv('audit-rep.csv',sep=',',encoding='latin1',index_col='Index', parse_dates=,dayfirst=False) This is the code I have used, and except for the label names, I am happy with the result. Instead of having these verbose reasons though, I would like to rename the X-Axis labels to just numbers or alphabets so that the graph reads somewhat like this:

#Matplotlib python rename x label registration

Vendor Registration not on record.another 300 words - 9.No contract with vendor.another 300 words - 14.Not approved by regional committee.another 300 words - 17.The problem I am facing is renaming the X-Axis labels.Įssentially, the chart is trying to plot a count of different types of Audit Violations, but has really long descriptions of the said violations. I have a CSV file that I am trying to read using Python, and looking to come up with charts. I'm running my code on iPython Notebooks, on a Macbook Pro Yosemite 10.10.4










Matplotlib python rename x label