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

Plotting graphic missing in Example file #2569

Open
FlorianBiboud opened this issue Mar 18, 2024 · 1 comment
Open

Plotting graphic missing in Example file #2569

FlorianBiboud opened this issue Mar 18, 2024 · 1 comment
Labels

Comments

@FlorianBiboud
Copy link

FlorianBiboud commented Mar 18, 2024

What happened?

Hello Openturn !

I find a missing one or two lines which is not a big bug, don't worry.

I am implementing a Sobol analysis for my project, and when looking at the example here, I found that running the script (.py one) provided in the page doesn't yield the graph as in the webpage. By looking around I found that you just need to add two lines, in the correct places.

from matplotlib import pylab as plt
plt.show()

So nothing alarming, but I guess if one want to reproduce directly the result he would be surprised. (But may be it is intended I don't know)

How to reproduce the issue?

Donwload the file and run it, one would not see the final graph appear.

Version

1.22

Operating System

Windows

Installation media

pip

Additional Context

No response

@jschueller jschueller added doc and removed bug labels Mar 18, 2024
@JPelamatti
Copy link
Collaborator

Hello Florian,

Thanks for the feeback. Indeed most of the examples only show the results when run in a Jupyter notebook.
Indeed, a possible solution would be to add a plt.show() at the end of the script, as you suggest, or alternatively relying on the viewer.View.ShowAll() method of the OpenTURNS graphical features.

We will try to correct the examples where this issue is present, and try to avoid it in the future !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants