Matplotlib: Markers

This function is used to handle the marker which is used to emphasize each point with the specified marker. It is used in the both marker functionality of the plot and scatter

In the table below there are some possible markers in matplotlib:

Symbols

Description

"."

Point

","

Pixel

"o"

circle

"v"

triangle_down

"^"

triangle_up

"<"

triangle_left

">"

triangle_right

"1"

tri_down

"2"

tri_up

"3"

tri_left

"4"

tri_right

"8"

octagon

"s"

square

"p"

pentagon

"P"

plus (filled)

"*"

star

“h”

hexagon1

"H"

hexagon2

"+"

plus

Example

import matplotlib.pyplot as plt
import numpy as np

x = np.array([5,10,15,20,25])

plt.plot(y, marker = 's')
plt.show()

Output

marker plot