Hello, All:

      I'm unable to control font size in plots created by "svg" in R 3.6.0 on macOS Mojave 10.14.5.  Consider the following:


svg('cex-svg.svg')
cex. <- 5
plot(1:2, cex.axis=cex.)
text(1:2, 1:2, c('as', 'DF'),
          cex=cex.)
dev.off()


      When I run this in R 3.5.2 under Windows 7, it works fine.  In R 3.6.0 under macOS 10.14.5, I get tiny fonts.  Changing "cex." has no impact on the result.  A question about this to R-Devel generated replies from Peter Langfelder and David Winsemius, who noted that it worked fine under Ubuntu 18.04 (supposedly with R 3.15.2 -- probably R 3.5.2, but I'm not sure).  I experimented with the width, height, pointsize and family arguments for "svg", without solving this problem.


      I believe this problem is fairly recent:  I just looked at svg files I created with R on this same computer probably last fall, and the font size looks reasonable -- better than what I get today.  I'm not 100 percent sure, but I think I was able to control the font size with the cex and cex.axis arguments with those earlier versions of R and macOS.


      Suggestions?
      Thanks,
      Spencer Graves


#  This script worked as expected on Windows:
sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
  [1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
  [1] stats     graphics  grDevices utils     datasets
[6] methods   base

loaded via a namespace (and not attached):
  [1] compiler_3.5.2 tools_3.5.2    yaml_2.2.0


# It failed on macOS:


sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.5

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.6/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
[6] methods   base

other attached packages:
[1] Ecdat_0.3-2 Ecfun_0.2-1

______________________________________________
r-de...@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

______________________________________________
r-de...@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to