octave-maintainers
[Top][All Lists]
Advanced

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

how to handle negative data and position values for log scales


From: Ben Abbott
Subject: how to handle negative data and position values for log scales
Date: Mon, 08 Nov 2010 23:41:38 +0800

On Nov 8, 2010, at 11:24 PM, Rik wrote:

> Ben,
> 
> How embarassing.  Using 'hg bisect' it appears that the problem appeared in
> changeset 11201:6c8791cb35b1 (__go_draw_axes__.m: Set proper tight axis
> limits for log scale.)  This is the patch we both worked on to get "axis
> tight" working, particularly for semilogy plots which this demo uses.
> David is blameless here.
> 
> I get the error from typing the commands at the prompt.  The problem is the
> last call to text.  From our patch, I see
> 
>  if (ylogscale)
>    obj.ydata(obj.ydata<=0) = NaN;
>  endif
> 
> but not all objects are going to have ydata.  The next bit of code in
> __go_draw_axes__.m is a huge switch table based on obj.type.  Perhaps we
> need to move this code down into the switch table where it will only affect
> objects which actually have ydata.
> 
> Cheers,
> Rik


As your email traveled to my side of the globe, I pushed a changeset for this.

After reading your email, I'm not sure how to proceed. 

        http://hg.savannah.gnu.org/hgweb/octave/rev/83d268af65cb

Should the change I just pushed be left in place, or shall negative values for 
different objects be handled differently for each object type for log scale 
plots?

For example, what if text objects for a semilogy plot have a negative 
y-positions? Perhaps my change should remain and something special be done for 
text objects?

Ben



reply via email to

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