help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Colormap in meshc.m


From: gustafson
Subject: Re: Colormap in meshc.m
Date: Wed, 3 Oct 2007 10:33:58 -0700 (PDT)

>> Details:
>> octave-2.9.14:1> figure(1)
>> octave-2.9.14:2> peaks
>> ## peaks appears in default colormap = 'jet'
>> ## I may have changed the default colormap so it would be 'jet'.
>> octave-2.9.14:3> colormap(gray)
>> octave-2.9.14:4> colormap(jet)
>> ## can change colormap to 'gray' and back to 'jet'.
>>
>> octave-2.9.14:5> figure (2)
>> octave-2.9.14:6> [x,y,z]=peaks;
>> octave-2.9.14:7> meshc(x,y,z)
>> ## I expect the peaks plot plus a contour plot in the xy-plane.
>> ## I can see that peaks is drawn first using colormap jet as expected
>> ## but then as the peaks are redrawn at the same time
>> ## as the contours are drawn,
>> ## the peaks plot changes to an unknown colormap
>> ## perhaps a combination of 2 different colormaps,
>> ## whereas the contours appear to use colormap 'jet'
>> ## The colors used for peaks and contours no longer match.
>>
>> octave-2.9.14:12> colormap (gray)
>> octave-2.9.14:13> colormap (jet)
>> ## This only affects the peaks portion of the plot
>> ## and has no effect on the contours portion of the plot.
>>## It will change the peaks to gray
>> ## then back to the same unknown colormap not 'jet'.
>>
>>
>>   
>
>The problem is with gnuplots treatment of the colourmap rather than in
>the colormap itself.. For the same function I don't see this effect with
>jhandles... I therefore think the problem is in Gnuplot..
>
>D.

Hi, I'm jumping in here a few days late.

Is it not that gnuplot is interpreting the colormap as applying over the
complete range of z?  When contour plots its lines, it sets the z values low
to be below the mesh itself, say z-dz.  Then gnuplot applies the colormap
over the whole range [min(z-dz) max(z)], resulting in a red shift for the
mesh plot itself?  The contour colors are not effected by this because they
defined in the line color specification given by contourc.

Perhaps this is exactly what David meant... however can we trick gnuplot by
sending a colormap that artificially spreads the desired colormap only over
the mesh plot values and not the z-dz values, say by padding the low end of
the colormap?

Pete
-- 
View this message in context: 
http://www.nabble.com/Colormap-in-meshc.m-tf4531739.html#a13023830
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]