From graphics-request at octave dot org Tue Sep 27 00:41:55 2005 Subject: Re: Multicolor mesh plot patch From: To: "John W. Eaton" , Quentin Spencer CC: , Date: Tue, 27 Sep 2005 1:41:22 -0400 > > From: "John W. Eaton" > Date: 2005/09/26 Mon PM 06:18:02 EDT > To: Quentin Spencer > CC: bug at octave dot org, graphics@octave.org > Subject: Multicolor mesh plot patch > > On 26-Sep-2005, Quentin Spencer wrote: > > | I'm not sure which list is best for this, so I'm sending it to bug and > | graphics. Someone recently was complaining about the quality of mesh > | plots, and I agree the two-color plots don't look that great. I > | discovered that this can be changed quite easily using gnuplot 4.0 > | features. The attached patch makes mesh use color lines. It also defines > | a color palette that is very similar to Matlab's default palette. I > | don't know if this is the best way to do this, I'm open to suggestions > | on how to improve it. > > It would be nice to be able to control the colors, but I wouldn't > worry about that just now. Fixing this problem probably means that we > want to get some kind of handle graphics capability in Octave soon so > that controlling these kinds of things will be simpler. > > | One thing that's missing is a check for whether > | the "palette" line type is valid. The octave-forge functions surf and > | surfc use a global gnuplot_has_pm3d, but it's a bit of a hack and I > | doubt John wants stuff like this in core Octave code. Is there any way > | to verify the capabilities of gnuplot from octave? We have things like > | OCTAVE_VERSION and OCTAVE_FORGE_VERSION defined, would it make sense to > | define GNUPLOT_VERSION? > > I'd rather avoid a check on the gnuplot version number. Even though John doesn't like the idea of a check (alright with me; autoconf sounds nice), halfway down this page http://www.gnuplot.info/links.html is 'imagegp.m' which gives an example of checking whether gnuplot's version is 4.1 or higher. Otherwise it will fall back on the current image plotting software... and give a short message the first time called saying that more recent versions of gnuplot are available. What if "set > palette" goes away at some point? The developers try to avoid deprecating syntax, or changing syntax unless it is contradictory. (That is why so much goes into discussion on new features.) Debate on the list is almost certain if someone wants to remove something. Dan