0

I am have couple of datas and when I plot them I am running out of linestyles. I have found couple of parametrized linestyles in this site, but somehow I cannot implement them.

https://matplotlib.org/3.3.1/gallery/lines_bars_and_markers/linestyles.html

Can someone show me what should I do put in this line of code to obtain those linestyles?

plt.plot(x, y, color = "magenta", linestyle = "-")

here is a sample code

import matplotlib.pyplot as plt
from numpy import linspace

x = linspace(0, 10, 100)
y = x**2 

plt.plot(x, y, color = "magenta", linestyle = "-")
plt.grid()
plt.show()
Arman Çam
  • 115
  • 7
  • You linked to a website and a script that explains that in detail. What else do you need to know? `plt.plot(x, y, color = "magenta", linestyle = "-.")` changes the linestyle and so does `plt.plot(x, y, color = "magenta", linestyle = "dotted")`. – Mr. T Nov 14 '20 at 08:02
  • I was talking about parametrized linestyles – Arman Çam Nov 14 '20 at 08:17
  • Not in your question. So, then it is `plt.plot(x, y, color = "magenta", linestyle = (0, (3, 10, 1, 10)))`. What exactly is the problem you encounter? – Mr. T Nov 14 '20 at 08:31

0 Answers0