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

plot continuously #3

Closed
fccf opened this issue Apr 5, 2018 · 1 comment
Closed

plot continuously #3

fccf opened this issue Apr 5, 2018 · 1 comment

Comments

@fccf
Copy link

fccf commented Apr 5, 2018

Is there a way to plot continuously in the same figure?

@kookma
Copy link
Owner

kookma commented Apr 6, 2018

What do you mean?
if you mean to have an open window and add more plots interactively, no, ogpf does not support this!
Actually gnuplot does not support this! and every plot clear the previous one!

How ogpf works?

ogpf works in a semi interactive mode. It writes all data and commands into a gnuplot file and then calls the gnuplot through a system command! So before you have the plot command you should write all your data into a file!

How to have several plots in the same window?

Solution 1. ogpf plot command can plot up to four series of data, if you you have four or less data, prepare all them and issue the plot command at the end!

Solution 2. If you want to replot in the same window, because your data are available at several stage of problem solution, then plot each data series is available and then when other data available replot them
e.g

call gp%plot(x1=x, y1=y)
! later on you have more data
..
call gp%plot(x1=x, y1=y, x2=xx, y2=yy)
! later on you have two more data series
call gp%plot(x1=x, y1=y, x2=xx, y2=yy, x3=xxx, y3=yyy, x4=xiv, y4=yiv))

Solution 3. If your data have the same length (number) then as you get more data for ploting add them to a matrix and plot a matrix.vs.matrix

Summary:
If you want to plot more data in the same window, it is possible in a semi interactive mode.
If you want something like "hold on" in Matlab, this version does not support.
A new version of ogpf is under the way which is much more complicated and it has support for hold on!

@kookma kookma added this to the closed! milestone Apr 6, 2018
@kookma kookma closed this as completed Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants