Hello,
Fernando Perez wrote:
> Nadav had reported in
>
> http://sourceforge.net/mailarchive/forum.php?thread_id=3592388&forum_id=11272
>
>
> having problems with mouse support with v1.7. After following Michael's
> debugging suggestion, I found the culprit to be line 188 of _Gnuplot.py:
>
> self('set terminal %s' % (gp.GnuplotOpts.default_term,))
[...]
> I fixed this for myself by just commenting out that line. It wasn't
> there in
> v1.5 which I've used for a long time without any problems, so I'm not
> too worried.
Coincidentally, this line was added at the suggestion of another user,
Chris Barker, who wrote:
> [...] I found (and fixed) a small bug in _Gnuplot.py. I was
installing it on Mac OS-X,
> using the Python2.2 that Apple delivered with OS-X 10.2. The terminal
should be
> set to "aqua" by default, but that was not happening. What I
discovered is that the
> Gnuplot object was not initializing the terminal to the default. The
correction is:
>
> In _Gnuplot.py
>
> At the end of: Gnuplot.__init__ (line 196)
>
> add:
> self('set terminal %s' % gp.GnuplotOpts.default_term)
>
> This sets the terminal to the default, and all is well.
> Michael may want to do something a bit better, perhaps including an
> option for
> 'set mouse' in the constructor, or mouse support auto-detection. If
> you want
> to go this route, let me know and I can send you the mouse support
> code I have
> in IPython's Gnuplot routines.
One quick-and-dirty fix would be to defer the initialization of the
terminal until the first plot (or splot) invocation. But I suppose that
a cleaner solution should be possible. However, I'm at a loss regarding
the best solution, since I've still never even used a version of gnuplot
with mouse support!
Michael
the absentee landlord
--
Michael Haggerty
mh...@al...
|