Matplotlib: Set marker for line plot

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.