1

I have a regular line graph

plt.figure(figsize=(10,5))
plt.plot(db['month_date'], db['quantity'], alpha=0.7)                
plt.ylabel('quantity')
plt.title('Quantity cards ')
plt.show()

This generates a normal line graph with a blue line, is there a way that the last three values of quantity are highlithed in a different color? So the normal Blue line and the last three values being red perhaps. If any one can help I would appreciate it very much.

Pandas INC
  • 323
  • 1
  • 7

1 Answers1

3

I'm not sure what you mean by last three values, last three values based on the x-axis? Or the y-axis. Anyway, have a look at this.

Example of multi-colored lines in Matplotlib documentation

J.W Ngo
  • 66
  • 6
  • 1
    please ["Provide context for links"](https://stackoverflow.com/help/how-to-answer) – Aprillion Dec 05 '19 at 07:46
  • 1
    I'd say the last three values of the y-axis If you know how to do that change directly I would appreciate it but if not I'll take your answer cause yeah that is pretty much what I am looking for Thank you very much J.W Ngo. – Pandas INC Dec 05 '19 at 07:46
  • 1
    >I'd say the last three values of the y-axis That would be the boundary norm part of the example instead of continuous norm. – J.W Ngo Dec 05 '19 at 07:52