ogpf icon indicating copy to clipboard operation
ogpf copied to clipboard

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

Open CRquantum opened this issue 3 years ago • 13 comments

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

CRquantum avatar Feb 16 '22 08:02 CRquantum

This is an automatic reply, confirming that your e-mail was received.Thank you!

fccf avatar Feb 16 '22 08:02 fccf

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.

kookma avatar Feb 16 '22 20:02 kookma

Great thank you! Again nice package!

CRquantum avatar Mar 07 '22 03:03 CRquantum

This is an automatic reply, confirming that your e-mail was received.Thank you!

fccf avatar Mar 07 '22 03:03 fccf

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 avatar Mar 07 '22 04:03 CRquantum

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!

CRquantum avatar Mar 07 '22 04:03 CRquantum

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!

kookma avatar Mar 07 '22 15:03 kookma

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.

CRquantum avatar Mar 07 '22 17:03 CRquantum

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

kookma avatar Mar 08 '22 04:03 kookma

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

CRquantum avatar Mar 09 '22 05:03 CRquantum

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

kookma avatar May 06 '22 05:05 kookma

thanks a lot. By the way what is PR? Regards, Rong

On May 5, 2022, at 22:56, Mohammad Rahmani @.***> wrote:



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

— Reply to this email directly, view it on GitHubhttps://github.com/kookma/ogpf/issues/36#issuecomment-1119282945, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMMZXVROL4APONBKR34W6ELVISX77ANCNFSM5OQ3DN5A. You are receiving this because you were mentioned.Message ID: @.***>

CRquantum avatar May 06 '22 07:05 CRquantum

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!

kookma avatar May 07 '22 06:05 kookma