Hello everyone,
I am trying to plot a graph from the result of LSTM anomaly.
I also have a list only_power which lie on blue line -- df['power'].
I want to show this 'only_power' list on blue line with red color but whenever I used my code I get missing y axis error.
How can I solve this problem, so that I can show 'only_power' list with red color in df['power'] line (blue line )
https://i.stack.imgur.com/HAze6.png
I am trying to plot a graph from the result of LSTM anomaly.
fig, ax = plt.subplots(figsize=(16,12)) ax.plot(pd.to_datetime(df['datetime']), df['power'], color='b', label='Normal') ax.scatter(only_power, label='Anomaly', marker='o') ax.xaxis_date() plt.xlabel('Date Time') plt.ylabel('power') plt.legend() fig.autofmt_xdate() plt.show()This code gives me a plot which is attached below.
I also have a list only_power which lie on blue line -- df['power'].
I want to show this 'only_power' list on blue line with red color but whenever I used my code I get missing y axis error.
How can I solve this problem, so that I can show 'only_power' list with red color in df['power'] line (blue line )
https://i.stack.imgur.com/HAze6.png
Larz60+ write Dec-15-2021, 10:27 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts.
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Fixed for you this time. Please use bbcode tags on future posts.