tics of log color axis

Ben Abbott bpabbott at mac.com
Thu May 28 03:39:11 CDT 2009


On May 28, 2009, at 3:43 AM, Petr Mikulik wrote:

>>> I have noticed two problems related to log color axis. These bugs  
>>> are in
>>> Octave 3.1.55 (while in Octave 3.0.x it does not work "at all"):
>>>
>>> A. Wrong tic labels in figure 2:
>>> figure(1)
>>> imagesc(1./hilb(99)); h=colorbar;
>>> figure(2)
>>> imagesc(1./hilb(99)); h=colorbar; set(h,'yscale','log');
>
> Could you please try to fix it by adding these commands:
>  set autoscale keepfix
>  set y2range [1:180]     # or whatever is the required range

I got lost trying to follow this discussion.

Can you describe the conditions under which "set autoscale keepfix"  
should be added to the plot stream?

>>> B. Yet another wrong tic labels:
>>> imagesc(log10(1./hilb(99))); h=colorbar;
>>> TL = get(h, 'YTick');
>>> %  set(h, 'YTickLabel', sprintf('10^%g|', TL));
>>> set(h, 'YTickLabel', sprintf('10^{%g}|', TL));
>>>
>>>
>>> Thanks for fixing this,
>>> Petr
>>
>> Regarding "B", I've attached a changeset.  I did some limited  
>> testing with no
>> problems.
>
> It works OK.
>
> Note: There is "FIXME - Can regexp() do this easier?" ... it looks  
> to me
> that this command:
> 	newlabel=strsplit(ticklabel, '|');
> could replace the loop as well.

Thanks, that is much nicer.

Ben



More information about the Bug-octave mailing list