[R-SIG-Mac] Miniature plot windows
Wright, Erik Scott
ESWRIGHT @end|ng |rom p|tt@edu
Mon Jan 22 23:06:09 CET 2024
Hi Simon,
Thanks for all you do to support R on Mac OS.
***
system_profiler SPHardwareDataType | grep Model
Model Name: MacBook Pro
Model Identifier: Mac15,9
Model Number: MUW63LL/A
***
system_profiler SPDisplaysDataType
Graphics/Displays:
Apple M3 Max:
Chipset Model: Apple M3 Max
Type: GPU
Bus: Built-In
Total Number of Cores: 40
Vendor: Apple (0x106b)
Metal Support: Metal 3
Displays:
Color LCD:
Display Type: Built-in Liquid Retina XDR Display
Resolution: 3456 x 2234 Retina
Main Display: Yes
Mirror: Off
Online: Yes
Automatically Adjust Brightness: Yes
Connection Type: Internal
***
inline::cfunction(,'CGDirectDisplayID md = CGMainDisplayID();
CGSize ds = CGDisplayScreenSize(md);
Rprintf("%.2f x %.2f -> %d x %d\\n", ds.width/25.4, ds.height/25.4,
(int)CGDisplayPixelsWide(md), (int)CGDisplayPixelsHigh(md));
return R_NilValue;',
'#include <ApplicationServices/ApplicationServices.h>')()
13.55 x 8.76 -> 1728 x 1117
NULL
***
Please let me know if anything else would be useful.
Erik
> On Jan 22, 2024, at 4:27 PM, Simon Urbanek <simon.urbanek using R-project.org> wrote:
>
> Erik,
>
> thanks, this is very unusual. Can you, please, send me more details about your setup? Please run the following two lines in Terminal and send me the full output:
>
> system_profiler SPHardwareDataType | grep Model
> system_profiler SPDisplaysDataType
>
> Then in R run the following code and also include the result:
>
> inline::cfunction(,'CGDirectDisplayID md = CGMainDisplayID(); CGSize ds = CGDisplayScreenSize(md); Rprintf("%.2f x %.2f -> %d x %d\\n", ds.width/25.4, ds.height/25.4, (int)CGDisplayPixelsWide(md), (int)CGDisplayPixelsHigh(md)); return R_NilValue;','#include <ApplicationServices/ApplicationServices.h>')()
>
> This should result in something like this (install the inline package if you don't have it and you will also need command line tools which you can get by running
> xcode-select --install
> in Terminal if you don't have them):
>
>> inline::cfunction(,'CGDirectDisplayID md = CGMainDisplayID(); CGSize ds = CGDisplayScreenSize(md); Rprintf("%.2f x %.2f -> %d x %d\\n", ds.width/25.4, ds.height/25.4, (int)CGDisplayPixelsWide(md), (int)CGDisplayPixelsHigh(md)); return R_NilValue;','#include <ApplicationServices/ApplicationServices.h>')()
> 23.54 x 13.24 -> 2048 x 1152
>
> This shows the physical size of the screen (in inches) and the current resolution.
>
> The Quartz dpi setting is NULL by default which means "detect from hardware" which works on all Macs I have seen so the fact that it is way off is odd. The code above is how the dimensions are determined.
>
> Cheers,
> Simon
>
> PS: if the email processing mangled the above code here is a broken-down version that hopefully doesn't get mangled:
>
> inline::cfunction(,'CGDirectDisplayID md = CGMainDisplayID();
> CGSize ds = CGDisplayScreenSize(md);
> Rprintf("%.2f x %.2f -> %d x %d\\n", ds.width/25.4, ds.height/25.4,
> (int)CGDisplayPixelsWide(md), (int)CGDisplayPixelsHigh(md));
> return R_NilValue;',
> '#include <ApplicationServices/ApplicationServices.h>')()
>
>
>
>> On Jan 23, 2024, at 3:41 AM, Wright, Erik Scott <ESWRIGHT using pitt.edu> wrote:
>>
>> Hi all,
>>
>> I recently upgraded to a new Macbook Pro (Nov 23). Now every plot is miniaturized.
>>
>> For example, my screen measures about 13.5" x 8.8" with a ruler. When I create a new plot with plot(1:10) or quartz(height=7, width=7), the plot measures 2.0" x 2.0".
>>
>> It is simple enough to initialize larger plot windows with dev.new or quartz(height=24.5, width=24.5), but the points and font stay miniaturized. Of course, I could rescale every single plot feature by 3.5-fold, but that seems like an inefficient solution.
>>
>> Any suggestions would be appreciated.
>>
>> Erik
>>
>> R version 4.3.2 (2023-10-31)
>> Platform: aarch64-apple-darwin20 (64-bit)
>> Running under: macOS Sonoma 14.2.1
>>
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac using r-project.org
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>
More information about the R-SIG-Mac
mailing list