problems with pagesize
Ben Abbott
bpabbott at mac.com
Sun Nov 9 17:53:29 CST 2008
On Nov 9, 2008, at 12:38 PM, Kai Habel wrote:
> Ben Abbott schrieb:
>> I'm running sources pulled and built on Nov 2. I've made one change
>> in
>> graphics.h.in
>>
>> < 2354 array_property papersize r , Matrix (1, 2, 0)
>>
>>> 2354 array_property papersize r , Matrix (1, 4, 0)
>>
>> I'm unfamiliar with the c++ side, but I inferred that (1, 4, 0)
>> created a matrix 1x2 and initialized it with 0's. As the papersize
>> should be 1x2, I changed it.
>>
>> However, that is not my problem.
>>
>> octave:1> figure ()
>> octave:1> get (gcf, "papersize")
>> ans = 0 0
>> octave:2> set (gcf, "papersize", [8.5 11])
>> error: set: unknown property "papersize"
>>
>> Perhaps this error is intentional and those who wrote this part
>> expect
>> "papertype" to be changed instead.
>>
>> In any event, the error should not occur. In Matlab
>>
>>>> figure(1)
>>>> get(gcf,'papersize')
>> ans = 8.5 11
>>>> set(gcf,'papersize',[6,4])
>>>> get(gcf,'papertype')
>> ans = <custom>
>>
>> I'm fairly close to being able to use the figures "position" and
>> "papersize"/"paperposition" to control the canvas size gnuplot. If
>> someone can take care of this for me, it would be greatly
>> appreciated.
>>
>> TiA
>> Ben
> Ben,
>
> the papersize is set read only at the moment, see the 'r' qualifier
>
> array_property papersize r , Matrix (1, 4, 0)
>
> and the genprops.awk script.
>
> I see no reason why it is set to read-only. If you remove the r and
> recompile you should be able to continue with your work.
>
> Kai
Thanks Kai,
For the moment I'm working with the property "paperposition" instead.
This property is responsible for determining the size of the plotted
image, and that is my focus at the moment. Later I'll want to be able
to position the image on the page correctly and for that I'll need the
first two indices of paperposition as well as papersize/papertype.
I'm also waiting for gnuplot to be patched to permit the size of the
rendered window to be specified as,
set terminal x11 [...] size XX,YY
Once these two things are in place, I should be able to follow up with
a changeset in a day or two. Then for the gnuplot backend the 3.1.51+
sources will render plots that respect the figure properties
position(3:4), units, name, numbertitle, paperposition, papersize/
papertype, and paperunits.
Some additional low level effort will be needed to handle the
recalculating values when the units are changed and the papersize when
the papertype is changed (and vice versa). If anyone is looking for
something to do ... ;-)
Thanks again,
Ben
Ben
More information about the Octave-maintainers
mailing list