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

Toggling history trace in legend only works on first vector in ReservoirSimulationTimeSeries #458

Closed
asnyv opened this issue Sep 30, 2020 · 15 comments · Fixed by #459
Closed
Labels
bug 🐛 Something isn't working good first issue Good for newcomers

Comments

@asnyv
Copy link
Collaborator

asnyv commented Sep 30, 2020

Describe the bug
Toggling the "History" in the legend only removes the "History" trace from the first vector if multiple vectors are plotted.

How to reproduce
Steps to reproduce the behavior:

  1. Go to Simulation time series
  2. Click on e.g. vectors FOPR, FGPR, FGPT
  3. Toggle history be clicking at "History" in the legend
  4. See that the black line only disappears in the uppermost subplot

Expected behavior
History trace should disappear in all subplots

Screenshots
Not toggled in legend, all visible (as it is supposed to be):
image
Toggled, still two history traces visible:
image

Additional context
Can most likely be fixed by adding a constant legendgroup to add_history_trace

return {
"line": {"shape": line_shape},
"x": df["DATE"],
"y": df[vector],
"hovertext": "History",
"hoverinfo": "y+x+text",
"name": "History",
"marker": {"color": "black"},
"showlegend": True,
}

@asnyv asnyv added the bug 🐛 Something isn't working label Sep 30, 2020
@asnyv asnyv added the good first issue Good for newcomers label Sep 30, 2020
@robpoll
Copy link

robpoll commented Sep 30, 2020

I'd like to work on this issue.

@asnyv
Copy link
Collaborator Author

asnyv commented Sep 30, 2020

I'd like to work on this issue.

Sorry @robpoll, as I had already identified the issue, and it was only one line to do it, I had already made the fix. But there are many other issues in the list 😉 😄

@robpoll
Copy link

robpoll commented Sep 30, 2020

Alright @asnyv. This project got my interest, so I'd like to contribute somehow. I'm new to this open source contributing, so something simple would be great for the beginning. What do you reckon?

@asnyv
Copy link
Collaborator Author

asnyv commented Sep 30, 2020

Not sure how familiar you are with subsurface simulation data @robpoll? If you are not, maybe it is a good idea to start in the more generic library webviz-config? webviz-subsurface is an extension of this directed towards ensemble based reservoir simulation applications in the petroleum industry.

@robpoll
Copy link

robpoll commented Sep 30, 2020

Unfortunately, I'm not familiar with that @asnyv. I'll have a look on issues in webviz-config, but I think without some guidance I wouldn't be able to really contribute and I'll have to look elsewhere.

@asnyv
Copy link
Collaborator Author

asnyv commented Sep 30, 2020

@robpoll Best place to start is probably to filter on "good first issues" in webviz-config.
They are a bit varied, several of them are focused on the framework itself, but if you prefer to work more towards the plugin side (similar to webviz-subsurface, which is mainly a collection of plugins for webviz-config), you can look at e.g. this: equinor/webviz-config#297 And if you have questions, comment in the relevant issue and we'll try to give the relevant input there 😄

@robpoll
Copy link

robpoll commented Sep 30, 2020

Alright, I'll have a look on that one. Thank you @asnyv. Will do so!

@robpoll
Copy link

robpoll commented Sep 30, 2020 via email

@asnyv
Copy link
Collaborator Author

asnyv commented Sep 30, 2020

@robpoll could you say exactly which steps you have made?

@robpoll
Copy link

robpoll commented Oct 1, 2020

git clone [email protected]:equinor/webviz-config.git

cd ./webviz-config

npm ci --ignore-scripts && npm run postinstall

pip install -e .

Instead of pip I used pip3.

@asnyv
Copy link
Collaborator Author

asnyv commented Oct 1, 2020

@robpoll Could you try "pip freeze" (or in your case "pip3 freeze") to see if webviz-config is in your list of installed packages?

@anders-kiaer
Copy link
Collaborator

anders-kiaer commented Oct 1, 2020

I would also try rehashing your terminal window (or simply opening a new terminal with the Python environment you installed it in activated). This could typically happen in general in already open terminal windows when what is available on your $PATHs changes (which it does when you install a new Python console entrypoint).

@robpoll
Copy link

robpoll commented Oct 1, 2020

Well, I have here webviz-core-components==0.1.0
and I have a strange entry, which is

-e [email protected]:equinor/webviz-config.git@a lot of characters#egg=webviz_config

@anders-kiaer
Copy link
Collaborator

and I have a strange entry, which is -e [email protected]:equinor/webviz-config.git@a lot of characters#egg=webviz_config

That is expected (when you install from unreleased source code, and not pip install webviz-config... more details here https://github.com/pypa/setuptools_scm).

@robpoll
Copy link

robpoll commented Oct 1, 2020

Thanks @anders-kiaer @asnyv, I have created another venv and installed once again. Now it works!

@anders-kiaer anders-kiaer moved this to Done 🏁 in Webviz Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working good first issue Good for newcomers
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants