octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #42311] colorbar incorrect after setting log s


From: Hartmut
Subject: [Octave-bug-tracker] [bug #42311] colorbar incorrect after setting log scale
Date: Fri, 16 Dec 2016 16:11:24 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #5, bug #42311 (project octave):

I have run Rik's test from comment #3 in Matlab. It turned out that newer
Matlab releases also do NOT support log-scale colorbars any more!

Therefore I suggest to lower the severity of this bug report to a WISH (for an
Octave-only feature) or only do a slight code change to make Octave's behavior
Matlab compatible and then CLOSE it.

Here are the details on the Matlab behavior (R2014b):

>> imagesc(eye(100)+1);
h=colorbar()
set (h, 'YScale', 'log') 

h = 

  ColorBar with properties:

    Location: 'eastoutside'
      Limits: [1 2]
    FontSize: 9
    Position: [0.8194 0.1091 0.0496 0.8155]
       Units: 'normalized'

  Show all properties

Error using matlab.graphics.illustration.ColorBar/set
There is no YScale property on the ColorBar class.
 
>> get (h)
            AxisLocation: 'out'
        AxisLocationMode: 'auto'
            BeingDeleted: 'off'
                     Box: 'on'
              BusyAction: 'queue'
           ButtonDownFcn: ''
                Children: []
                   Color: [0.1500 0.1500 0.1500]
               CreateFcn: ''
               DeleteFcn: ''
               Direction: 'normal'
               FontAngle: 'normal'
                FontName: 'Helvetica'
                FontSize: 9
              FontWeight: 'normal'
        HandleVisibility: 'on'
                 HitTest: 'on'
           Interruptible: 'off'
                   Label: [1x1 Text]
                  Limits: [1 2]
              LimitsMode: 'auto'
               LineWidth: 0.5000
                Location: 'eastoutside'
                  Parent: [1x1 Figure]
           PickableParts: 'visible'
                Position: [0.8194 0.1091 0.0496 0.8155]
                Selected: 'off'
      SelectionHighlight: 'on'
                     Tag: 'Colorbar'
           TickDirection: 'in'
    TickLabelInterpreter: 'tex'
              TickLabels: {11x1 cell}
          TickLabelsMode: 'auto'
              TickLength: 0.0100
                   Ticks: [1 1.1000 1.2000 1.3000 1.4000 1.5000 1.6000 1.7000
1.8000 1.9000 2]
               TicksMode: 'auto'
                    Type: 'colorbar'
           UIContextMenu: [1x1 ContextMenu]
                   Units: 'normalized'
                UserData: []
                 Visible: 'on'

>> 


I will also attach the resulting Matlab figure.

There are also Matlab users complaining about the removal of this feature:
*
https://de.mathworks.com/matlabcentral/answers/100066-how-do-i-create-a-logarithmic-scale-colormap-or-colorbar
*
https://de.mathworks.com/matlabcentral/answers/203697-logarithmic-scale-for-colorbar

There is still a slight descrepancy between Octave and Matlab in this
respect:
* Matlab throws an error when you try to create a log-scale colorbar. The
colorbar stays colored (with a lin-scale).
* Octave just displays the "log-scale" colorbar but silently takes all the
colors out.
Maybe we should also just throw an error and keep the colors lin-scale?

(file #39253)
    _______________________________________________________

Additional Item Attachment:

File name: Matlab(R2014b)_Figure.jpg      Size:123 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42311>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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