octave-maintainers
[Top][All Lists]
Advanced

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

Re: how to handle negative data and position values for log scales


From: Ben Abbott
Subject: Re: how to handle negative data and position values for log scales
Date: Tue, 09 Nov 2010 08:31:26 +0800

On Nov 9, 2010, at 4:17 AM, Rik wrote:

>> 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
>> 
> Ben,
> 
> I think your patch is fine.  Although it might be clearer to move the code
> into each of the sub-objects which is affected, it would also create a lot
> of redundancy.  When we next need to tweak this issue we'd find ourselves
> hunting through the code to find all the occurrences to update.  Your
> current code is concise and represents just one instance to update.
> 
> As for negative y-positions, there is currently no support for it at the
> axis level.  That would need to be addressed before considering whether
> objects can be placed at negative locations.  In my opinion this is too
> small a corner case to worry about.  If you're interested though, try
> running a semilog plot on Matlab and forcing the y-axis to display negative
> values.  What do they do?
> 
> Note that confining placement to the visible axis isn't really much of a
> restriction.  For example, the left-axis on the plotyy demo goes to -1, but
> the right-axis is log scale and starts at 10^-1.  One can still place
> objects that seem to occur at negative positions relative to the left-axis
> by using the second axis and y-positions that are positive and above 10^-1.
> 
> Cheers,
> Rik

I'll favor avoiding redundancy, and leave the patch as it is.

I'll also place the text problem on my list of things to look at.

Ben



reply via email to

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