Quantcast
Channel: Processing Forum
Viewing all articles
Browse latest Browse all 1768

Client terminates Gnuplot

$
0
0
Hi,

In my sketch I open Gnuplot to plot some data. I use the "-persist" parameter to make the plot window stay open until I stop the sketch. 

Strangely, if I have a network client that receives some data from a server, Gnuplot will terminate after a couple of seconds. 

The test code below works fine without a Client (if line 12. is commented out). Could someone replicate the problem? You need, of course, Gnuplot installed.

I'm using Processing 2.0.1 on Win7.

Thanks,

Gyula


Test code:
  1. import processing.net.*; 

  2. int myByteArraySize = 10000;
  3. byte[] byteBuffer = new byte[myByteArraySize];
  4. Server myServer;
  5. Client myClient;

  6. void setup() {
  7.   size(200, 200);
  8.   myServer = new Server(this, 5204);
  9.   myClient = new Client(this, "127.0.0.1", 5204);
  10. }

  11. void draw() { 
  12.   myServer.write(byteBuffer);
  13. }

  14. void mousePressed() {
  15.   open("gnuplot -persist -e \"plot sin(x)\"");
  16. }

Viewing all articles
Browse latest Browse all 1768

Trending Articles