[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changeset 14257 oddities
From: |
Ben Abbott |
Subject: |
Re: Changeset 14257 oddities |
Date: |
Sat, 10 Mar 2012 10:29:32 -0500 |
On Mar 10, 2012, at 12:04 AM, Rik wrote:
> 3/9/12
>
> Ben,
>
> I've just noticed that this changeset is causing oddities in the
> documentation. All of the printed images, which are supposed to be 750 x
> 525 are being rendered as 525 x 750. The changeset deals with
> paperorientation so perhaps this is not surprising.
>
> changeset: 14257:5cc69bafe3b9
> parent: 14254:73086d4b64fa
> user: Ben Abbott <address@hidden>
> date: Tue Jan 24 08:29:33 2012 -0500
> summary: Add updating for figure paperorientation property. Bug # 35329.
>
> Code which provokes the problem for me
>
> plot (1:10)
> get (gcf, 'paperorientation')
> => portrait
> get (gcf, 'papersize')
> => 8.5000 11.0000
> set (gcf, 'papersize', [5.0 3.5])
> get (gcf, 'paperorientation')
> => landscape
> get (gcf, 'papersize')
> => 3.5000 5.0000
> print foo.png
>
> The printed png is printed in a portrait mode which is 3.5 wide X 5.0 high
> instead of the papersize I set.
>
> --Rik
Rik, I've cc'd the list, as I think this merits some discussion (and I'm not
sure what the proper solution is)
When I experimented with Matlab, I found its behavior inconsistent. I don't
recall all the details now. I'll take a look when I'm done with the fixing the
text objects set_position method.
In any event (from memory), the current implementation was intended to map a
wide page to "landscape" and a tall page to "portrait" orientation (and vice
versa). Perhaps this is not consistent with how print() works ?
The Matlab docs do not specifically indicate that a wide page -> "landscape"
and a tall page -> "portrait".
I suggest we attempt to determine the proper behavior from the Matlab docs and
implement that.
If the orientation does not map to wide/tall, but just rotates the page, then
the fix needs to be in graphics.cc and your example will work like ...
> plot (1:10)
> get (gcf, 'paperorientation')
> => portrait
> get (gcf, 'papersize')
> => 8.5000 11.0000
> set (gcf, 'papersize', [5.0 3.5])
> get (gcf, 'paperorientation')
> => portrait
> get (gcf, 'papersize')
> => 5.0000 3.5000
If the orientation does map to wide/tall then the fix needs to be in print.m
and your example will remain the same except the output will be 5x3.5
Thoughts / opinions ?
Ben
- Re: Changeset 14257 oddities,
Ben Abbott <=
- Re: Changeset 14257 oddities, Ben Abbott, 2012/03/10
- Re: Changeset 14257 oddities, Rik, 2012/03/10
- Re: Changeset 14257 oddities, Ben Abbott, 2012/03/10
- Re: Changeset 14257 oddities, Ben Abbott, 2012/03/10
- Re: Changeset 14257 oddities, Ben Abbott, 2012/03/10
- Re: Changeset 14257 oddities, Ben Abbott, 2012/03/11
- Updaters and default property values (was :Changeset 14257 oddities), Ben Abbott, 2012/03/11
- Re: Updaters and default property values (was :Changeset 14257 oddities), Michael Goffioul, 2012/03/12
- Re: Updaters and default property values (was :Changeset 14257 oddities), Ben Abbott, 2012/03/12
- Re: Updaters and default property values (was :Changeset 14257 oddities), Michael Goffioul, 2012/03/12