Skip to main content

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

Tags
Submitted by devanshi.srivastava on November 22, 2021

Devanshi, is working as a Data Scientist with iVagus. She has expertise in Python, NumPy, Pandas and other data science technologies.

About

At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.