简体   繁体   中英

Is there a non-blocking equivalent to JavaPlot.plot()?

I'm using JavaPlot in windows 7 to plot multiple datasets in Java, and I've found that the plot() method contains a section that waits for the GNUPlot process to end.

What this means in practice is that the program waits for me to close the plot before continuing. This is with persist set to true. If I set persist to false, the plot appears and immediately closes (as described in this question).

What I'd like to be able to do is have the program plot each dataset in quick succession, leaving me with many GNUplot windows open at once. That way I can look through them all in one go, compare them, or ignore them altogether, without having to close each one individually as the program runs. Is there an asynchronous version of the plot command, or something else that might do this?

The closest thing I can think of is outputting the plots as image files and opening them all in the windows image viewer, but then I lose GNUPlot's zoom functionality.

Windows + GNUPlot is a bad combination unfortunately. If you have tried with older versions of JavaPlot, you'd see that it wasn't even possible to do what you wanted to do. Now, at least the window will not close.

Now, for your question, no there is no such thing, mainly because GNUplot does not actually support it.

What you could do though, is to plot() from a new thread and thus no blocking will occur.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM