Python ProgrammingPython Programming

How to plot a line graph with marker in Matplotlib?

Line graph with Marker:

import matplotlib.pyplot as plt

# Changing default values for parameters individually
plt.rc('lines', linewidth=2, linestyle='-', marker='*')
plt.rcParams['lines.markersize'] = 25
plt.rcParams['font.size'] = '10.0'

#Plot a line graph
plt.plot([10, 20, 30, 40, 50])
# Add labels and title
plt.title("Interactive Plot")

The following is the output that will be obtained:

Line graph with Marker