cyrusyc commited on
Commit
df0fa6f
1 Parent(s): 17bfe96

horizontal bar, add color

Browse files
Files changed (1) hide show
  1. serve/tasks/combustion.py +8 -5
serve/tasks/combustion.py CHANGED
@@ -132,19 +132,22 @@ st.plotly_chart(fig)
132
 
133
  fig = go.Figure()
134
 
 
 
135
  fig.add_trace(
136
  go.Bar(
137
- x=df["method"],
138
- y=df["steps_per_second"],
139
- marker_color="blue",
140
  opacity=0.75,
 
 
141
  )
142
  )
143
 
144
  fig.update_layout(
145
  title="MD runtime speed (on single A100 GPU)",
146
- xaxis_title="Method",
147
- yaxis_title="Steps per second",
148
  )
149
 
150
  st.plotly_chart(fig)
 
132
 
133
  fig = go.Figure()
134
 
135
+ df = df.sort_values("steps_per_second", ascending=True)
136
+
137
  fig.add_trace(
138
  go.Bar(
139
+ x=df["steps_per_second"],
140
+ y=df["method"],
 
141
  opacity=0.75,
142
+ orientation="h",
143
+ marker=dict(color=[method_color_mapping[method] for method in df["method"]]),
144
  )
145
  )
146
 
147
  fig.update_layout(
148
  title="MD runtime speed (on single A100 GPU)",
149
+ xaxis_title="Steps per second",
150
+ yaxis_title="Method",
151
  )
152
 
153
  st.plotly_chart(fig)