Here is an image:
I want to plot three error graphs with predicted vs actual values in one plot, scatter plots. I couldn't figure out how to do that with plotly.express
, but I figured it out with graph_objects
library of plotly
. But now I want to add a traceline
for each individual data set, and annotations with the r^2
value and the mean absolute error.
I found how to add tracelines
in plotly.expresss
but not in plotly.graph_objects :sweat_smile
. Anyone have any suggestions?
f3 = go.Figure(
data = [
go.Scatter(x=errors_doge_df['Day 1 percent test'], y=errors_doge_df['Day 1 percent predicted'],mode='markers', name="Day 2"),
go.Scatter(x=errors_doge_df['Day 2 percent test'], y=errors_doge_df['Day 2 percent predicted'],mode='markers', name="Day 3"),
go.Scatter(x=errors_doge_df['Day 3 percent test'], y=errors_doge_df['Day 3 percent predicted'],mode='markers', name="Day 4"),
],
layout = {"xaxis": {"title": "Test Percentage Change Data"}, "yaxis": {"title": "Predicted Percentage Change Data"}, "title": "Doge Prediction Error Graph"}
)
f3.show()