0

I'm encountering some matplotlib behaviour that I do not understand. I have a daframe:

august.head()     
                     value
 config name    
low max velocity    -0.000145
medium max velocity -0.000165
reference           -0.000198
high max velocity   -0.000192

When I plot this dataframe using

plt.plot(august)

I get the following plot:

enter image description here

My data seems plotted chaotically and the blue line 'comes back to a previous x value' (sorry, that's the best I can do for a description of my problem)

I would like to see my data plotted with plt.plot(august) just as when I plot it using

august.plot()

Which gives me a good, ordered graph: enter image description here

Any ideas?

Thanks

Community
  • 1
  • 1
Jurgen Palsma
  • 300
  • 1
  • 3
  • 16

1 Answers1

0

Maybe the config names were ordered alphabetically ? In that case you could associate an integer to each config name, like here: plot-with-custom-text-for-x-axis-points

Jacques Ung
  • 157
  • 2
  • 6