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

add optional wait = .false. to call execute_command_line ('wgnuplot -persist ' // this%txtfilename) #36

Open
CRquantum opened this issue Feb 16, 2022 · 13 comments

Comments

@CRquantum
Copy link

Hi @kookma !
This is awesome package, love it!
Just a small suggestion, not an issue.
Do you think perhaps you could at some place let the user choose to plot without wait? I mean so that it can plot several plots simultaneously without wait for the previous one to complete.
E.g, at wait = .false. in call execute_command_line,

call execute_command_line ('wgnuplot -persist ' // this%txtfilename, wait = .false. )

Thanks!
Best regards,
Rong

@fccf
Copy link

fccf commented Feb 16, 2022 via email

@kookma
Copy link
Owner

kookma commented Feb 16, 2022

Hi @CRquantum
Thank you! I think this should be possible. I keep this open to find free time to give it a try!
If worked successfully I add it.

@CRquantum
Copy link
Author

Great thank you! Again nice package!

@fccf
Copy link

fccf commented Mar 7, 2022 via email

@CRquantum
Copy link
Author

Oh, another question. Is there a way to show the plot in real time?
I mean like, just in the same windows, show (x(1),y(1)), (x(2),y(2)),...(x(10),y(10)) as x(i) and y(i) are generated in the loop?
Like

do i=1,10
    x(i) = xxxxx
    y(i) = yyyyy
    -> here, you know, plot(x(1:i), y(1:i)) in just only one popup windows, and display and update (x(1:i), y(1:i)) in real time.
enddo

Thank you very much! This real time display/updating in just one windows will be really very useful bro! LOL!

@CRquantum
Copy link
Author

I mean I noticed the animation function, but it seems it need to wait until the whole x and y loop finished, then in one window, it can display y vs x as animation. But I wonder is it possible show y .vs. x animation during the loop, and in the same popup window. Thank you very much!

@kookma
Copy link
Owner

kookma commented Mar 7, 2022

Oh, another question. Is there a way to show the plot in real time?
I mean like, just in the same windows, show (x(1),y(1)), (x(2),y(2)),...(x(10),y(10)) as x(i) and y(i) are generated in the loop?

The ogpf is wrapper around gnuplot! So everything is supported by gnuplot is supported by ogpf. You should not ogpf work in asynchronous way! It has to write everything in a file and then plot so, before start plotting you should have all those data to be plotted!
If you update the data, then you have to create a new output!

@CRquantum
Copy link
Author

Thank you my man!
Please see the discussion here,
https://fortran-lang.discourse.group/t/how-to-use-fortran-gnuplot-to-plot-in-real-time-in-just-one-window/2904/11
I added at the end of your scipt

pause 1
reread

Now it can display the changes in the plot in real time.
If in the future you may add this property it could be very nice :) Sometimes the display in real time can be very useful.

@kookma
Copy link
Owner

kookma commented Mar 8, 2022

Thank you @CRquantum
I will look into it! It would be nice to have this feature!

@CRquantum
Copy link
Author

Thank you bro. Yeah it can work it will be really very useful :)

@kookma
Copy link
Owner

kookma commented May 6, 2022

@CRquantum
I would appreciate to submit a PR when you have time. I am very busy and I forgot about this.

@CRquantum
Copy link
Author

CRquantum commented May 6, 2022 via email

@kookma
Copy link
Owner

kookma commented May 7, 2022

A PR is a pull request, that means you can form the repo, change the code and push it for merging!
Then others can review your change and if approved merge into the repository!
In final you have the revised/improved code!

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

No branches or pull requests

3 participants