I have the following code to plot a line and a point:
df = pd.DataFrame({\'x\': [1, 2, 3], \'y\': [3, 4, 6]})
point = pd.DataFrame({\'x\': [2], \'y\': [5]})
Another issue that exists when using the .plot(..) method is that the legend is displayed with lines and not dots.
To fix this issue, I would recommend to use plt.scatter(..) as such:
df = pd.DataFrame({'x': [1, 2, 3], 'y': [3, 4, 6]})
point = pd.DataFrame({'x': [2], 'y': [5]})
fig, axes = plt.subplots(1, 2, figsize=(20, 5))
# OP VERSION
df.plot('x', 'y', ax=axes[0], label='line')
point.plot('x', 'y', ax=axes[0], style='r-', label='point')
# MY VERSION
df.plot('x', 'y', ax=axes[1], label='line')
axes[1].scatter(point['x'], point['y'], marker='o', color='r', label='point')
axes[1].legend(loc='upper left')
I obtain this result, with on the left, OP's method, and on the right, my method: