I would like to plot a dot on the line chart using Python, the data is as below:
Close high_marked low_marked
Date
2007-01-01 20:01:00 118.610 118.62 118.61
2007-01-01 20:02:00 118.600 0.00 0.00
2007-01-01 20:03:00 118.610 0.00 0.00
2007-01-01 20:04:00 118.610 0.00 0.00
2007-01-01 20:05:00 118.610 0.00 0.00
The line chart is drawn on the 'Close' column, and I want to plot the dot of 'high_marked' as well as 'low_marked' whenever their the value is not 0.
I have tried
fig, axes = plt.subplots(figsize = (12,8))
axes.plot(table.Close, 'darkorange')
axes.plot(table.high_marked, 'g.')
axes.plot(table.low_marked, 'r.')
However, because the array on 'high_marked' and 'low_marked' contains 0 so the chart becomes
How to get rid of the zeros that plot on the chart?
Thanks!