octave-maintainers
[Top][All Lists]
Advanced

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

Re: default color of bar plots


From: Ben Abbott
Subject: Re: default color of bar plots
Date: Fri, 18 Nov 2011 18:53:53 -0500

On Nov 18, 2011, at 6:08 PM, Ben Abbott wrote:

> 
> On Nov 18, 2011, at 3:21 PM, John W. Eaton wrote:
> 
>> The changeset
>> 
>> http://hg.savannah.gnu.org/hgweb/octave/rev/e36c2f4ea8f5
>> 
>> caused the default color of bar plots to go from blue to a light green
>> color.
>> 
>> I could undo the changeset, but I suspect that is not the correct fix.
>> 
>> Is Octave handling clim, cdata, and cdatamapping correctly (as in
>> compatible with Matlab) for patch graphics objects?
>> 
>> If not, what is supposed to be happening.  It is my understanding that
>> patch objects are supposed to be colored according to the current
>> colormap, but I'm not sure what properties affect that behavior, or
>> how they are supposed to work.  Some help with this would be much
>> appreciated.
>> 
>> jwe
> 
> 
> I tried bar(1), which produces a blue bar for ML R2011b and an green one for 
> Octave (tip: 99cd136079f7).
> 
> For Matlab I see ...
> 
>       CData = [1;1;1;1]
>       CDataMapping = 'scaled'
>       FaceColor = 'flat'
> 
> With clim = [1 2] for the axes.
> 
> and for Octave ...
> 
>       cdata = 0
>       cdatamapping = 'scaled'
>       facecolor = 'flat'
> 
> With clim = [-1 1] for the axes.
> 
> The climmode for both Octave and Matlab is set to "auto".
> 
> Ben

I tried a related example to try to get some more insight.

        for c = 0:1
                figure (1)
                clf
                patch ([0 0 1 1], [0 1 1 0], c)
                clim = get (gca, 'clim')
        end

For both Octave and ML, clim = c + [-1 1]

Perhaps Matlab caxis works differently for scalar cdata and vertex cdata?

Ben



reply via email to

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