[R-SIG-Mac] quartz aspect wrong

Hank Stevens HStevens at MUOhio.edu
Sun Jun 8 19:17:07 CEST 2008


Hi Simon,
dpi=100 works great. Thanks!
Hank
On Jun 8, 2008, at 1:07 PM, Simon Urbanek wrote:

> Hank,
>
> R 2.7.0 (unlike previous versions) allows non-square pixels and
> determines the pixel aspect ratio from the physical dimensions of the
> screen (unless specified directly). In your case I suspect that the
> reported physical dimensions are that of the non-rotated screen
> whereas the pixel dimensions are rotated - that will result in a bogus
> dpi.
>
> Try setting dpi=100 (or the exact x and y resolutions of your screen
> if you know it). That should fix the problem (you can use
> quartz.options to make the change permanent).
>
> Unfortunately CGDisplayRotation is only available in Mac OS X 10.5 so
> we cannot require it to determine the rotation. I have added some
> heuristics to match the orientation of the physical and pixel
> dimensions. It may throw off some unusual geometry screens but it
> should work in your case (sort of the most usual unusual case ;)), so
> please try tonight's R-devel or R-patched.
>
> Thanks,
> Simon
>
>
> On Jun 8, 2008, at 11:51 AM, Hank Stevens wrote:
>
>> Hi Folks,
>> I am using R version 2.7.0 (2008-04-22). The problem I describe is
>> new since 2.6.2.
>>
>> I find that
>>
>> x11(width=7, height=7)
>>
>> gives me a square device but
>>
>> quartz(,7,7)
>> or
>> plot(1:10)
>>
>> results in a quartz device that does not appear square on my machine
>> - the aspect is distorted compared to the X11 device. It looks
>> stretched too tall and a tiny bit too narrow.
>>
>> I am not sure if any of this is relevant:
>>
>> I am on a Mac (10.5.3) and have two Dell monitors on their sides so
>> I have two tall side by side screens. The resolutions are both 1024
>> x 1280, and they are rotated 90 and 270 deg.
>>
>> My .RProfile includes
>>
>> grDevices::ps.options(horizontal = FALSE)
>>
>> .First <- function() {cat(paste(date()),"\nRecepcion al R asombroso,
>> dude!\n\n")
>> #library(CarbonEL)
>> # Sys.setenv("DISPLAY"=":0")
>> options(device="quartz")
>>                   }
>>
>> Thanks for any thoughts.
>> Hank
>>
>> Dr. Hank Stevens, Associate Professor
>> 338 Pearson Hall
>> Botany Department
>> Miami University
>> Oxford, OH 45056
>>
>> Office: (513) 529-4206
>> Lab: (513) 529-4262
>> FAX: (513) 529-4243
>> http://www.cas.muohio.edu/~stevenmh/
>> http://www.cas.muohio.edu/ecology
>> http://www.muohio.edu/botany/
>>
>> "If the stars should appear one night in a thousand years, how would
>> men
>> believe and adore." -Ralph Waldo Emerson, writer and philosopher
>> (1803-1882)
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>>
>



Dr. Hank Stevens, Associate Professor
338 Pearson Hall
Botany Department
Miami University
Oxford, OH 45056

Office: (513) 529-4206
Lab: (513) 529-4262
FAX: (513) 529-4243
http://www.cas.muohio.edu/~stevenmh/
http://www.cas.muohio.edu/ecology
http://www.muohio.edu/botany/

"If the stars should appear one night in a thousand years, how would men
believe and adore." -Ralph Waldo Emerson, writer and philosopher  
(1803-1882)



More information about the R-SIG-Mac mailing list