Feb-22-2018, 08:33 PM
Hello I'm just starting to programme in Python :)
So I want to plot a graph using matplotlib.
my qustion is how to write a code which starts from the second line of data of a specific line
for example my plot is starts from 1962 but I want it starts from 1963.
how i do to make it works?
Thank you for any advice,
So I want to plot a graph using matplotlib.
my qustion is how to write a code which starts from the second line of data of a specific line
for example my plot is starts from 1962 but I want it starts from 1963.
how i do to make it works?
Thank you for any advice,
import matplotlib.pyplot as plt plt.stackplot(time, DDI*100, SDI*100,CDI*100,WDI*100, colors=['green','red','yellow','blue']) plt.title('Drive mechanism') plt.xlabel('Year') plt.ylabel('Drive %') plt.xticks(np.arange(min(time)+1, max(time), 5)) plt.show()