Trying to plot parametrized linestlyes - Implementation problem

  • Context: Python 
  • Thread starter Thread starter Arman777
  • Start date Start date
  • Tags Tags
    Plot
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 1K views
Arman777
Insights Author
Gold Member
Messages
2,163
Reaction score
191
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


Python:
 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()
 
Last edited:
Physics news on Phys.org