Unknown
Unknown

Reputation: 77

Multi color -Time series scatter plot in python

I'm a newbie to python. I have time series data for which I need a scatter plot. I basically want the normal and abnormal tags to have different colors. See below images of the data and plot:

Actual data

enter image description here

Expected rearrangement in Data

enter image description here


Expected Plot

enter image description here


I'll be very thankful for any leads in this! Thanks in advance!

Upvotes: 0

Views: 1079

Answers (1)

Yon P
Yon P

Reputation: 206

You can use matplotlib.pyplot's scatter

import matplotlib.pyplot as plt

plt.scatter('#normal_TimestampColumn', '#normalColumn', facecolors='b')
plt.scatter('#abnormal_timestampColumn', '#abnormalColumn', facecolors='orange')

Upvotes: 1

Related Questions