gnuplotlib icon indicating copy to clipboard operation
gnuplotlib copied to clipboard

Gnuplot hang

Open tavurth opened this issue 8 years ago • 2 comments

gp.plot(
    np.random.rand(10)*25 + 25, 
    unset='grid', 
    terminal='dumb 80 40', 
    set='arrow from 5,10 to 5,0') 

Causes the pipe to hang, and give the message:

Gnuplot process no longer responding. This is likely a bug in gnuplotlib
and/or gnuplot itself. Please report this as a gnuplotlib bug

The following does not cause the pipe to hang, and displays correctly:

gp.plot(
    np.random.rand(10)*25 + 25, 
    unset='grid', 
    terminal='dumb 80 40', 
    set='arrow from 5,10 to 5,0.1') 

Notice the 0.1 instead of 0

tavurth avatar May 27 '16 13:05 tavurth

On May 27, 2016 6:55:04 AM PDT, Will [email protected] wrote:

gp.plot(np.random.rand(10)*25 + 25, unset='grid', terminal='dumb 80 40', set='arrow from 5,10 to 5,0') Causes the pipe to hang, and give the message:

Gnuplot process no longer responding. This is likely a bug in
gnuplotlib
and/or gnuplot itself. Please report this as a gnuplotlib bug

gp.plot(np.random.rand(10)*25 + 25, unset='grid', terminal='dumb 80 40', set='arrow from 5,10 to 5,0.1')

Does not cause the pipe to hang, and displays correctly.

Thanks for the report. I can see the issue, and will look at it later in the day.

dkogan avatar May 27 '16 18:05 dkogan

Will [email protected] writes:

gp.plot(np.random.rand(10)*25 + 25, unset='grid', terminal='dumb 80 40', set='arrow from 5,10 to 5,0') Causes the pipe to hang, and give the message:

Gnuplot process no longer responding. This is likely a bug in gnuplotlib
and/or gnuplot itself. Please report this as a gnuplotlib bug

gp.plot(np.random.rand(10)*25 + 25, unset='grid', terminal='dumb 80 40', set='arrow from 5,10 to 5,0.1')

Does not cause the pipe to hang, and displays correctly.

Hi. So this is a gnuplot not being quite as smart as would be nice. It is also a corner case. You hit this issue if all are true:

  • dumb terminal
  • have plot objects created with set (like you do here with your arrow)
  • plotting with binary data

As a simple workaround, pass ascii=1

I'm working on a fix in gnuplot, but it's not obvious to me it's worth the trouble. In any case, I'm not done yet. Keeping this open in the meantime. Thanks for the report.

dkogan avatar May 29 '16 04:05 dkogan

Hi. This works today. Closing.

dkogan avatar Sep 27 '22 20:09 dkogan