How to use Matplotlib markers

import numpy as np
import matplotlib.pyplot as plt

ypoints = np.array([3,4,10,12])

#for solid line
#plt.plot(ypoints, '-')

#for dashed line
#plt.plot(ypoints,'--')

#for dashed and dotted lines
#change the colour and size of the marker
#plt.plot(ypoints,marker = 'o',ms=20,mec='r')

#change the face colour to red
plt.plot(ypoints,marker = 'o',ms = 20, mfc = 'g')
plt.show()

Comments

Popular posts from this blog

ESP32 Error: A fatal error occurred: Timed out waiting for packet content.

How to calculate Mean, Median and Mode in python

Detecting Obstacles and Warnings with ultrasonic sensor