Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Matplotlib: Set marker for line plot

📅 2012-Oct-02 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ line plot, marker, matplotlib ⬩ 📚 Archive

Matplotlib is a plotting library written in Python that can be used to create line plots. By default, all the values are drawn with no marker symbol.

To set a marker assign it to the named argument marker in the call to pyplot.plot():

matplotlib.pyplot.plot( ..., marker="^" )

The list of all supported line styles and their usage can be found here.

Tried with: Matplotlib 1.2, Python 3.2.3 and Windows 7 x64


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧