# Ruby/gnuplot on windows

**URL:** <https://www.ruby-forum.com/t/ruby-gnuplot-on-windows/60627>\
**Category:** Ruby\
**Created:** [May 16, 2006, 10:38am UTC](https://www.ruby-forum.com/t/ruby-gnuplot-on-windows/60627 "2006-05-16T10:38:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jdruse](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b38774/32.png) [@jdruse](https://www.ruby-forum.com/u/jdruse)\
**Post date:** [May 16, 2006, 10:38am UTC](https://www.ruby-forum.com/t/ruby-gnuplot-on-windows/60627/1 "2006-05-16T10:38:25Z")

</div>

Using the sine wave example from the home page how to, I’ve been able to  
get gnuplot to generate the plot but it immediately terminates, flashing  
only briefly on the screen. I bypassed the which method and hardcoded  
the executable in the gnuplot.rb starting at 44:

def Gnuplot.gnuplot( persist = true )  
#cmd = which( ENV[‘RB\_GNUPLOT’] || ‘gnuplot’ )  
#cmd += " -persist" if persist  
cmd = “C:\Gnuplot\pgnuplot.exe” + " -persist" if persist  
cmd  
end

It appears that the -persist flag is not being passed to the command  
line. Any thoughts on how to get the -persist flat to function and keep  
the graph active long enough for me to view it?  
Thanks,  
-j
