1

Hi I am trying to make a graph to display some data, my issue is I want the x-axis to have years value

df6=df6["percent"]
list = df6.values.tolist()

import matplotlib.pyplot as plt

plt.plot(list)
plt.show()

I get the graph 

Graph I have

But I want the graph to be like this Graph I want

Please Help!

1

1 Answer 1

1

I can't tell what your data looks like, but if you loop through your years data and add the value of 1880 to it all, your graph should display the x-axis similarly to the picture you have provided.

For example:

0 + 1880 = 1880
50 + 1880 = 1930
100 + 1880 = 1980

And so on..

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.