pcolor and "interp" [changeset-2]

Ben Abbott bpabbott at mac.com
Mon Sep 29 13:25:24 CDT 2008


On Sep 29, 2008, at 1:29 PM, John W. Eaton wrote:

> On 29-Sep-2008, Ben Abbott wrote:
>
> | As gnuplot 4.2.4+ has been patched to properly interpolate colors,  
> is
> | there a way to check when gnuplot 4.2.4 is being used (as opposed to
> | 4.2.3)?
>
> You could use the compare_versions function, but I would try to avoid
> it if possible.  Is special syntax required for 4.2.4?
>
> jwe

The function __go_draw_axes__.m already calls __gnuplot_version__(),  
but the version returned by __gnuplot_version__ does not include the  
second decimal (i.e. mine returns 4.2).

I wouldn't say that 4.2.4 need's a "special syntax". The problem is  
that the current syntax used by Octave does not support interpolation  
of colors. Gnuplot 4.2.4+ and 4.3 are able to do the job correctly  
(changes of Octave's syntax is required), while versions = 4.1-4.2.3  
are able to partially support interpolation of colors (again changes  
are required, although they are not all exclusive) ... and the syntax  
used for 4.2.4 & 4.3 is different than that of 4.1-4.2.3.

There is already one variable respecting the version of gnuplot.

	have_newer_gnuplot  = compare_versions (__gnuplot_version__ (),  
"4.0", ">")

I've added two more :-(

For more information see the comments below

	http://www.nabble.com/Re%3A-pcolor-and-%22interp%22--changeset-2--p19680735.html

and the corrected changeset

	http://www.nabble.com/Re%3A-pcolor-and-%22interp%22--changeset-2--p19686606.html

It occurs to me that a variable for the gnuplot version should be  
effectively declared persistent so as not to slow down the execution.  
Once the version is being used to modify gnuplot's syntax to what  
degree is it appropriate to do so?

Advice on what is appropriate would be appreciated.

Ben





More information about the Bug-octave mailing list