# Re: ruby/gnuplot on windows

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

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 19, 2006, 10:47am UTC](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/95014/1 "2006-05-19T10:47:33Z")

</div>

This is very strange.  
Gnuplot can (not yet on your computer) produce a plot to different  
outputs.  
These are called terminals.  
In \_[http://t16web.lanl.gov/Kawano/gnuplot/label-e.html\_](http://t16web.lanl.gov/Kawano/gnuplot/label-e.html_)  
([http://t16web.lanl.gov/Kawano/gnuplot/label-e.html](http://t16web.lanl.gov/Kawano/gnuplot/label-e.html)) , you find some  
values  
you can set there.  
All of them should work on whatever system you use Gnuplot on.

Does this help :  
\_[http://www.cygwin.com/ml/cygwin-xfree/2005-03/msg00087.html\_](http://www.cygwin.com/ml/cygwin-xfree/2005-03/msg00087.html_)  
([Alexander Gottwald - Re: gnuplot: unable to open display ''](http://www.cygwin.com/ml/cygwin-xfree/2005-03/msg00087.html)) ?

Otherwise, you could try to export your graph to eps format and view  
it in Ghostview by executing

gnuplot\> set terminal postscript enhanced color  
gnuplot\> set output “myplot.eps”  
gnuplot\> plot sin(x)

(You may need to install Ghostview first on your system, from here:

\_[http://www.cs.wisc.edu/~ghost/gsview/index.htm\_](http://www.cs.wisc.edu/~ghost/gsview/index.htm_)  
([http://www.cs.wisc.edu/~ghost/gsview/index.htm](http://www.cs.wisc.edu/~ghost/gsview/index.htm)) .)

These gnuplot commands produce a file myplot.eps in the current  
directory (Cygwin command pwd tells you which it is).  
Using the Windows Ghostview program, you can open it to see the  
graph, if successful…

Best regards,

Axel

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 19, 2006, 11:25am UTC](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/95014/2 "2006-05-19T11:25:25Z")

</div>

> Does this help :  
> \_[http://www.cygwin.com/ml/cygwin-xfree/2005-03/msg00087.html\_](http://www.cygwin.com/ml/cygwin-xfree/2005-03/msg00087.html_)  
> ([Alexander Gottwald - Re: gnuplot: unable to open display ''](http://www.cygwin.com/ml/cygwin-xfree/2005-03/msg00087.html)) ?

So from this link, I entered in the cygwin shell:

startx

and an x-shell opened. From here I can run

gnuplot -persist test.plt

and it works. Is this how you are doing it? Is there a way to have ‘x’  
active but working within the cygwin shell? The next step (which got us  
started on this whole process) would be to try to run a ruby/gnuplot  
program. Will being in the x shell complicate this?

jon
