From pd@lgd @ending from gm@il@com  Thu Sep  6 11:47:13 2018
From: pd@lgd @ending from gm@il@com (peter dalgaard)
Date: Thu, 6 Sep 2018 11:47:13 +0200
Subject: [Rd] svg ignores cex.axis in R3.5.1 on macOS
In-Reply-To: <02422C33-8D62-41AA-9064-EE4FADD33F2D@llnl.gov>
References: <ac8f9908-f064-d723-61a8-7e8ca085dd43@prodsyse.com>
 <c506e0f9-bf78-cab1-3d38-ef8b0b1dd850@prodsyse.com>
 <02422C33-8D62-41AA-9064-EE4FADD33F2D@llnl.gov>
Message-ID: <E0DF64F8-672E-4634-AB2D-7C2EE2EF83A1@gmail.com>

I think this needs to be taken off the bug repository and continued here. By now it seems pretty clear that this is not an R bug, but a local problem on Spencer's machine, likely connected to font configurations.

I poked around a bit on the three Macs that I can access, and found that fc-match does different things, including throwing warnings, hanging and even crashing my old MB Air...

One possible reason is that it can apparently be installed in multiple locations, for reasons lost in the mists of time:

Peters-iMac:BUILD-dist pd$ ls -l /opt/local/bin/fc-*
-rwxr-xr-x  1 root  wheel  44072 Apr  5  2014 /opt/local/bin/fc-cache
-rwxr-xr-x  1 root  wheel  43444 Apr  5  2014 /opt/local/bin/fc-cat
-rwxr-xr-x  1 root  wheel  34480 Apr  5  2014 /opt/local/bin/fc-list
-rwxr-xr-x  1 root  wheel  34928 Apr  5  2014 /opt/local/bin/fc-match
-rwxr-xr-x  1 root  wheel  34480 Apr  5  2014 /opt/local/bin/fc-pattern
-rwxr-xr-x  1 root  wheel  34008 Apr  5  2014 /opt/local/bin/fc-query
-rwxr-xr-x  1 root  wheel  34448 Apr  5  2014 /opt/local/bin/fc-scan
-rwxr-xr-x  1 root  wheel  38780 Apr  5  2014 /opt/local/bin/fc-validate
Peters-iMac:BUILD-dist pd$ ls -l /opt/X11/bin/fc-*
-rwxr-xr-x  1 root  wheel  58128 Oct 26  2016 /opt/X11/bin/fc-cache
-rwxr-xr-x  1 root  wheel  57600 Oct 26  2016 /opt/X11/bin/fc-cat
-rwxr-xr-x  1 root  wheel  48384 Oct 26  2016 /opt/X11/bin/fc-list
-rwxr-xr-x  1 root  wheel  48992 Oct 26  2016 /opt/X11/bin/fc-match
-rwxr-xr-x  1 root  wheel  44256 Oct 26  2016 /opt/X11/bin/fc-pattern
-rwxr-xr-x  1 root  wheel  44000 Oct 26  2016 /opt/X11/bin/fc-query
-rwxr-xr-x  1 root  wheel  44288 Oct 26  2016 /opt/X11/bin/fc-scan
-rwxr-xr-x  1 root  wheel  48608 Oct 26  2016 /opt/X11/bin/fc-validate
Peters-iMac:BUILD-dist pd$ ls -l /usr/local/bin/fc-*
-rwxr-xr-x@ 1 root  wheel  1463900 Oct 21  2008 /usr/local/bin/fc-cache
-rwxr-xr-x@ 1 root  wheel  1459780 Oct 21  2008 /usr/local/bin/fc-cat
-rwxr-xr-x@ 1 root  wheel  1455628 Oct 21  2008 /usr/local/bin/fc-list
-rwxr-xr-x@ 1 root  wheel  1476560 Oct 21  2008 /usr/local/bin/fc-match

Notice that these are all different, no links. I guess that the ones you want are in /opt/X11, presumably installed by XQuartz.

So, going out on a limb, I have two ideas:

(A) Rebuild the font cache with

/opt/X11/bin/fc-cache -vf

(B) Check that XQuartz is up to date (possibly reinstall it, even if it is) 

-pd

> On 5 Sep 2018, at 21:13 , MacQueen, Don via R-devel <r-devel at r-project.org> wrote:
> 
> Seems ok on my system. Axis label size changes when cex.axis does.
> 
> ## tested in the middle of another long session, so many additional packages are attached, including some personal packages not available elsewhere
> 
>> sessionInfo()
> R version 3.5.1 (2018-07-02)
> Platform: x86_64-apple-darwin15.6.0 (64-bit)
> Running under: macOS High Sierra 10.13.6
> 
> Matrix products: default
> BLAS: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
> LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
> 
> locale:
> [1] C
> 
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base     
> 
> other attached packages:
> [1] survival_2.42-3 ROracle_1.3-1   DBI_1.0.0       bookdown_0.7    knitr_1.20      rmarkdown_1.10  wdr_3.2         taurus_3.2-4    xlsx_0.6.1     
> [10] rmacq_1.3-8    
> 
> loaded via a namespace (and not attached):
> [1] Rcpp_0.12.17    magrittr_1.5    splines_3.5.1   lattice_0.20-35 highr_0.7       stringr_1.3.1   tools_3.5.1     grid_3.5.1      xfun_0.3       
> [10] tinytex_0.6     htmltools_0.3.6 yaml_2.1.19     rprojroot_1.3-2 digest_0.6.15   zip_1.0.0       Matrix_1.2-14   rJava_0.9-10    xlsxjars_0.6.1 
> [19] evaluate_0.10.1 openxlsx_4.1.0  stringi_1.2.3   compiler_3.5.1  backports_1.1.2
> 
> --
> Don MacQueen
> Lawrence Livermore National Laboratory
> 7000 East Ave., L-627
> Livermore, CA 94550
> 925-423-1062
> Lab cell 925-724-7509
> 
> 
> 
> ?On 8/31/18, 1:02 PM, "R-devel on behalf of Spencer Graves" <r-devel-bounces at r-project.org on behalf of spencer.graves at prodsyse.com> wrote:
> 
> 
> 
>    On 2018-08-31 14:21, Spencer Graves wrote:
>> Plots produced using svg in R 3.5.1 under macOS 10.13.6 ignores 
>> cex.axis=2.  Consider the following:
>> 
>> 
>>> plot(1:2, cex.axis=2)
>>> svg('svg_ignores_cex.axis.svg')
>>> plot(1:2, cex.axis=2)
>>> dev.off()
>>> sessionInfo()
>> R version 3.5.1 (2018-07-02)
>> Platform: x86_64-apple-darwin15.6.0 (64-bit)
>> Running under: macOS High Sierra 10.13.6
>> 
>> Matrix products: default
>> BLAS: 
>> /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRblas.0.dylib
>> LAPACK: 
>> /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
>> 
>> locale:
>> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
>> 
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods base
>> 
>> loaded via a namespace (and not attached):
>> [1] compiler_3.5.1
>> 
>> 
>>      ** The axis labels are appropriately expanded with the first 
>> "plot(1:2, cex.axis=2)".  However, when I wrote that to an svg file 
>> and opened it in other applications (GIMP and Safari), the cex.axis 
>> request was ignored.  This also occurred inside RStudio on my Mac. It 
>> worked properly using R 3.2.1 under Windows 7.
> 
> 
>    I just confirmed that when I created a file like this under Windows 7 
>    and brought it back to my Mac, it displayed fine.  I have not tried this 
>    with the current version of R under Windows 7 nor an old version of R on 
>    my Mac.  Thanks.  Spencer
>> 
>> 
>>      Thanks,
>>      Spencer Graves
>> 
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>> 
> 
>    ______________________________________________
>    R-devel at r-project.org mailing list
>    https://stat.ethz.ch/mailman/listinfo/r-devel
> 
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



[Rd] svg ignores cex.axis in R3.5.1 on macOS
peter dalgaard