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: John W. Eaton
Subject: Re: default color of bar plots
Date: Fri, 18 Nov 2011 21:39:17 -0500

On 18-Nov-2011, 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.

Hmm, doing

  bar (1)
  set (get (h, 'children'), 'cdata', [1;1;1], 'cdatamapping', 'scaled');
  set (gca, 'clim', [1 2])

in Octave doesn't make the bar blue.  For me, it ends up not filled at
all, or filled with white, I'm not sure which.  So it seems that in
addition to not having the properties quite right, the renderer might
also be misbehaving.

| 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".

Can you compare all the properties for Matlab and Octave for the bar
plot and a patch plot?

I don't understand whether the bar function is supposed to be setting
values for the patch objects it creates, or whether they are using
patch function default values.

jwe


reply via email to

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