# Re: Calling plotutils from xemacs using Ruby GSL

**URL:** <https://www.ruby-forum.com/t/re-calling-plotutils-from-xemacs-using-ruby-gsl/80094>\
**Category:** Ruby\
**Created:** [March 12, 2006, 2:41pm UTC](https://www.ruby-forum.com/t/re-calling-plotutils-from-xemacs-using-ruby-gsl/80094 "2006-03-12T14:41:30Z")\
**Posts on this page:** 1\
**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:** [March 12, 2006, 2:41pm UTC](https://www.ruby-forum.com/t/re-calling-plotutils-from-xemacs-using-ruby-gsl/80094/1 "2006-03-12T14:41:30Z")

</div>

Sorry, I actually wanted to say something else in my last mail,  
letting you try

> ruby rnd3.rb | graph -Tps \> g.ps ,

which works out for me. It sends the results from ruby to the external  
GNU program “graph” , which is part of the plotutils package.  
I can then open the file g.ps with ghostscript (gv,ggv or whatever).

The errors

NameError: uninitialized constant RND etc…

you reported come from the fact that Ruby does not know what these  
constants  
are, and after some digging into the description of rb-gsl, I found  
out that there are two ways of requiring rb-gsl,

require “rbgsl” or require “gsl”,

one of these forms lets you drop everything before the ‘::’ , so you  
can  
use

a=dir\_2d®

instead of

a = RND::dir\_2d® .

Maybe the author changed his mind on which form of require to associate  
with which form in between…

But I still am not able to run the first program you posted, either,  
where I also get the error

graph([x,y], [roots.real,zero], “-T X -C -g 3 -S 4”)  
NoMethodError: GNU plotutils required  
from (irb):7:in `graph’  
from (irb):7

you reported. I do not know how to fix this directly, but for me, it  
worked  
out to patch that by piping the results of a ruby program into graph as  
above.

Sorry I can’t help any further -maybe more experienced users of  
plotting  
with plotutils under rb-gsl are willing to help out ?

Best regards,

Axel
