Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use realization number instead of dataframe index for tagging realizations #486

Merged
merged 1 commit into from
Nov 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Fixed
- [#486](https://github.com/equinor/webviz-subsurface/pull/486) - Bug fix in `PropertyStatistics`. Show realization number instead of dataframe index for hover text.

## [0.1.4] - 2020-10-29
### Added
- [#457](https://github.com/equinor/webviz-subsurface/pull/457) - Raise a descriptive error if a scratch ensemble is empty, i.e. no `OK` target file is found in any realizations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,18 +186,18 @@ def add_ensset_realization_traces(
"line": {"shape": self.get_line_shape(vector)},
"x": list(real_df["DATE"]),
"y": list(real_df[vector]),
"hovertext": f"Realization: {real_no}, Ensemble: {ensemble}",
"hovertext": f"Realization: {real}, Ensemble: {ensemble}",
"name": ensemble,
"legendgroup": ensemble,
"marker": {
"color": self.ens_colors.get(
ensemble, self.ens_colors[list(self.ens_colors.keys())[0]]
)
},
"showlegend": real_no == 0,
"showlegend": real_idx == 0,
}
for ens_no, (ensemble, ens_df) in enumerate(dataframe.groupby("ENSEMBLE"))
for real_no, (real, real_df) in enumerate(ens_df.groupby("REAL"))
for real_idx, (real, real_df) in enumerate(ens_df.groupby("REAL"))
]

if (
Expand Down Expand Up @@ -229,12 +229,12 @@ def add_realization_traces(
"y": list(real_df[vector]),
"hoverinfo": "skip",
"name": ensemble,
"customdata": real_no,
"customdata": real,
"legendgroup": ensemble,
"marker": {"color": "red"},
"showlegend": real_no == 0,
"showlegend": real_idx == 0,
}
for real_no, (real, real_df) in enumerate(dataframe.groupby("REAL"))
for real_idx, (real, real_df) in enumerate(dataframe.groupby("REAL"))
]

if (
Expand Down