Closed LalithShiyam closed 1 year ago
@DariaFerrara, a sample of said plots can be found below:
The spreadsheet is attached: Moco_Data_Stats.xlsx
Exactly, however, it would be nice to have the interpolation of the line plots as splines. So that the plot lines and symmetric bands look smooth. Just aesthetic issues. @DariaFerrara @Keyn34
import pandas as pd
import plotly.graph_objs as go
# Load excel file
df = pd.read_excel(r"C:\\Users\\ferra\\Downloads\\Moco_Data_Stats.xlsx", sheet_name=0)
# Define variables and standard deviations to plot
x = df['Frames']
y1 = df['DICE mean [motion-imposed, original data]']
y2 = df['DICE mean [constant GREEDY, original data]']
y1_std = df['DICE STD [motion-imposed, original data]']
y2_std = df['DICE STD [constant GREEDY, original data]']
# Line plot with symmetric error bands
fig = go.Figure([go.Scatter(x=x, y=y1,
mode='lines',
line=dict(color='rgb(51, 153, 51)', shape='spline'),
name='constant GREEDY'),
go.Scatter(x=x, y=y1+y1_std,
mode='lines',
marker=dict(color="#444"),
line=dict(width=0, shape='spline'),
showlegend=False),
go.Scatter(x=x, y=y1-y1_std,
marker=dict(color="#444"),
line=dict(width=0, shape='spline'),
mode='lines',
fillcolor='rgba(214, 245, 214, 0.5)',
fill='tonexty',
showlegend=False),
go.Scatter(x=x, y=y2,
mode='lines',
line=dict(color='rgb(204, 0, 102)', shape='spline'),
name='motion imposed'),
go.Scatter(x=x, y=y2+y2_std,
mode='lines',
marker=dict(color="#444"),
line=dict(width=0, shape='spline'),
showlegend=False),
go.Scatter(x=x, y=y2-y2_std,
marker=dict(color="#444"),
line=dict(width=0, shape='spline'),
mode='lines',
fillcolor='rgba(204, 0, 102, 0.2)',
fill='tonexty',
showlegend=False)])
fig.update_layout(xaxis_title='Frames', yaxis_title='DICE score',
title='Mean DICE score after constant GREEDY per frame before vs. after',
hovermode="x",
plot_bgcolor='white')
fig.show()
fig.write_html(r"C:\Users\ferra\Desktop\falcon_plot.html")
Plots needed:
@Keyn34: please show a sample of the line plot with symmetric error bands that you created with excel to @DariaFerrara.