Skip to content

Commit

Permalink
Make a copy of reponses dataframe instead of using it directly
Browse files Browse the repository at this point in the history
  • Loading branch information
xjules committed Mar 22, 2021
1 parent e4904df commit f4d7dd1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ertviz/controllers/response_correlation_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,19 @@ def update_response_overview_plot(
style = deepcopy(assets.ERTSTYLE["response-plot"]["response-index"])
else:
style = deepcopy(assets.ERTSTYLE["response-plot"]["response"])
data_df = response.data_df()
data_df = response.data_df().copy()

style["marker"]["color"] = data["color"]
style.update({"marker": {"color": data["color"]}})
style.update({"line": {"color": data["color"]}})
_plots += [
PlotModel(
x_axis=x_axis,
y_axis=data_df[x_val],
text="Mean",
name=f"Mean {repr(ensemble)}",
y_axis=data_df[realization],
text=realization,
name=realization,
**style,
)
for x_val in data_df
for realization in data_df
]

for obs in response.observations:
Expand Down

0 comments on commit f4d7dd1

Please sign in to comment.