# Bless roger's gnuplot as official?

**URL:** <https://www.ruby-forum.com/t/bless-rogers-gnuplot-as-official/182504>\
**Category:** Ruby\
**Created:** [January 29, 2010, 1:35am UTC](https://www.ruby-forum.com/t/bless-rogers-gnuplot-as-official/182504 "2010-01-29T01:35:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwv549](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ac8455/32.png) [@bwv549](https://www.ruby-forum.com/u/bwv549)\
**Post date:** [January 29, 2010, 1:35am UTC](https://www.ruby-forum.com/t/bless-rogers-gnuplot-as-official/182504/1 "2010-01-29T01:35:33Z")

</div>

I really like the original rgplot (aka ‘gnuplot’ gem). It is a great  
gem. Unfortunately, its development has been abanded by its author  
(or so it would seem).

Roger P. put it up on github about a half year ago after consulting  
with the mailing groups. ([New ruby gnuplot - Ruby - Ruby-Forum](http://www.ruby-forum.com/topic/191589)) I  
noticed he has a gem named rdp-gnuplot up on the repos. How about  
making Roger’s the official ‘gnuplot’ gem? In other words, have Roger  
push his gem as ‘gnuplot’ instead of ‘rdp-gnuplot’. Any objections to  
this? This will allow Roger (and the community since Roger is open to  
pull requests) the ability to make some improvements to the ‘official’  
gem.

Of course, this depends on if the original developer has ‘claimed’ the  
gnuplot gem on gemcutter. If not I move that Roger ‘claim’ it. If  
people want the original ‘gnuplot’ they can always get it by version  
( gem install gnuplot -v 2.2 )

Browsing the code, I know some minor improvements have already been  
made.

Here are a couple things that could be updated (assuming Roger hasn’t  
done these yet):

1. Get mouse interactions working using this workaround:  
[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/293549](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/293549)

2. The ability to ‘unset’ settings.  
[http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/307504](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/307504)

---

<div class="post-metadata">

**Author:** ![bwv549](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ac8455/32.png) [@bwv549](https://www.ruby-forum.com/u/bwv549)\
**Post date:** [January 29, 2010, 10:12am UTC](https://www.ruby-forum.com/t/bless-rogers-gnuplot-as-official/182504/2 "2010-01-29T10:12:23Z")

</div>

On Jan 28, 2010, at 16:35 , bwv549 wrote:

> In other words, have Roger  
> push his gem as ‘gnuplot’ instead of ‘rdp-gnuplot’. Any objections to  
> this? This will allow Roger (and the community since Roger is open to  
> pull requests) the ability to make some improvements to the ‘official’  
> gem.

what does it matter if people contribute to the “official” one, or to  
roger’s fork? If they’re contributing, they’re contributing.

---

<div class="post-metadata">

**Author:** ![bwv549](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ac8455/32.png) [@bwv549](https://www.ruby-forum.com/u/bwv549)\
**Post date:** [January 29, 2010, 2:29pm UTC](https://www.ruby-forum.com/t/bless-rogers-gnuplot-as-official/182504/3 "2010-01-29T14:29:36Z")

</div>

Ryan D. wrote:

> On Jan 28, 2010, at 16:35 , bwv549 wrote:
> 
> > In other words, have Roger  
> > push his gem as ‘gnuplot’ instead of ‘rdp-gnuplot’. Any objections to  
> > this? This will allow Roger (and the community since Roger is open to  
> > pull requests) the ability to make some improvements to the ‘official’  
> > gem.
> 
> what does it matter if people contribute to the “official” one, or to  
> roger’s fork? If they’re contributing, they’re contributing.

I agree. Same with rails’ will-paginate, or rather,  
mislav\_will-paginate. People know that Mislav’s is the official one, and  
if you don’t, Google tells you by bringing up Mislav’s fork first.

---

<div class="post-metadata">

**Author:** ![bwv549](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/ac8455/32.png) [@bwv549](https://www.ruby-forum.com/u/bwv549)\
**Post date:** [January 29, 2010, 8:38pm UTC](https://www.ruby-forum.com/t/bless-rogers-gnuplot-as-official/182504/4 "2010-01-29T20:38:09Z")

</div>

bwv549 wrote:

> 1. Get mouse interactions working using this workaround:  
> [http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/293549](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/293549)

The good news is that gnuplot version 4.3 solves this problem by letting  
you bind to the close event. (Before 4.3, using xwindows, you either  
have to use -persist, which doesn’t support mouse, or you have to have a  
another process polling for WM\_STATE=withdrawn using xprop.)

Here[1] is a version of my gnuplot lib that has the appropriate  
workarounds for each version of gnuplot up thru the 4.4 beta. (It also  
uses the version to choose the terminal type.) It should be fairly easy  
to at least get the 4.3 code out of that, even if you don’t want to  
bother with support for older versions. Briefly, the code is this:

On xwindows, fork a gnuplot and send it these commands:

set mouse  
bind allwindows Close ‘exit gnuplot’

# your plotting commands here

then the parent just does:

Process.wait

This gnuplot lib is not really a competitor to either of the two gems.  
It doesn’t try to wrap up the plot configuration commands in any kind of  
object oriented interface. (I prefer to use the string interface rather  
than objects, because it is so familiar and compact.)

[1] [http://path.berkeley.edu/~vjoel/vis/plot.tgz](http://path.berkeley.edu/~vjoel/vis/plot.tgz)
