help-octave
[Top][All Lists]
Advanced

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

Re: printing plots in 3.2.2


From: Ben Abbott
Subject: Re: printing plots in 3.2.2
Date: Thu, 06 Aug 2009 07:54:08 -0400


On Aug 5, 2009, at 10:27 PM, John W. Eaton wrote:

On  4-Aug-2009, Ben Abbott wrote:

| (3) Listeners should reconcile the position/outerposition/ tightinset/
| activepositionproperty properties, and would avoid cropping the axes
| labels when the activepositionproperty == "outerposition".
|
| Until the listener in (3) are in place,

What is needed to make this happen?  Maybe I could help, though you
or someone else would probably have to provide the details of the
listener functions.

jwe

Its been a while since I looked at the. So I may get some details wrong, but ...

(1) Octave needs to take responsibility over the positioning of the ticklabels and axeslabels. (2) A method to needed to determine the extents of text objects ("extent" is a property). (3) When the axes ticklabels, axeslabels, title, position, or outerposition are changed, the tightinset property needs to be updated. This requires that the extents of the text objects are known. (4) For activepositionproperty == outerposition; when the position or tightinset changes, verify the position+tightinset does not extend beyond the outerposition box. If it does, implicitly modify the position property to compensate. (5) For activepositionproperty == position; when the outerposition or tightinset changes, verify the outerposition-tightinset does not encroach into the position box. If it does, implicitly modify the outerposition property to compensate.

I suspect using approximations for the first two would work rather well in this instance.

To implicitly set the position or outerposition properties, a pair of new properties (__position__, __outerposition__) could be added when the user can read buy not modify. I'll divert to another area needing work, as it may make sense to start there.

(1) Matlab's addproperty function is unrelated to Octave's. Matlab's addproperty adds a custom property to the COM object. I think this is a windows only thing. (2) What Matlab has that is equivalent is setappdata, getappdata, isappdata, and rmappdata. Which appear (to me) to create a property (called AppData?) of type structure whose fields correspond to the "appdata" properties for that object (I'm not describing this very well, but I hope you get the idea). (3) Perhaps it would make sense to create another property of type structure called InternalData (for ex), which contains all the internal properties such as __backend__, etc.

In early 2008, I had experimented with an implementation using m- files, but decided that was not the proper approach as the listeners need to be added at a lower level. If I have some time this weekend, I'll dig out that old code and see what its status is. If it is, more or less, operational it may help to understand the remaining details.

Ben




reply via email to

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