equinor / equinor/ert

"Flipping" plot axes is not straight forward

Open
#12,970 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

improvement
Dominant language
Python
Stars
161
Forks
141
Avg merge
2d 4h
Merged PRs (30d)
138

Description

We have implemented two flags for the plot config which flips axes in order to plot certain graphs in a nice way.
https://github.com/equinor/ert/blob/f6840957602dd3a50fcee9fd250e8c3065bb1bd9/src/ert/gui/tools/plot/plottery/plot_config.py#L91-L92

The flip_response_axis is used for RFT plots to plot depth in decreasing value on the Y axis.
The flip_observation_axis is used for Breakthrough plots to flip the observations horizontally.

However, just flipping these flags does not work by itself, there is custom logic in endpoints which are tailored to fit these flags.
It would be nice for maintainability if these flags would work by themselves without depending on any other custom logic elsewhere in the code.
For example for breakthrough observations we need to ensure that the std is converted to time deltas:
https://github.com/equinor/ert/blob/f6840957602dd3a50fcee9fd250e8c3065bb1bd9/src/ert/gui/tools/plot/plottery/plots/observations.py#L62-L71

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/ert/gui/tools/plot/plottery/plot_config.py at the flip_response_axis and flip_observation_axis flags, then read the related logic in src/ert/gui/tools/plot/plottery/plots/observations.py. Trace the RFT and Breakthrough plot endpoints that currently adapt to these flags. Done means the flags work independently while preserving the intended axis orientation and observation behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.