Python – How to plot a single point in matplotlib

matplotlibpythonseaborn

I'd like to plot a single point on my graph, but it seems like they all need to plot as either a list or equation.

I need to plot like ax.plot(x, y) and a dot will be appeared at my x, y coordinates on my graph.

import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import host_subplot
import mpl_toolkits.axisartist as AA
import numpy
fig = plt.figure()
plt.xlabel('Width')
plt.ylabel('Height')
ax = fig.gca()
ax.plot(105, 200)
plt.grid()
plt.show()

enter image description here

Best Answer

This worked for me:

plt.plot(105,200,'ro')