[Rd] point size in svg

Spencer Graves @pencer@gr@ve@ @end|ng |rom prod@y@e@com
Mon Jun 24 06:37:53 CEST 2019


       Thanks to Peter Langfelder and David Winsemius for their replies.


       It must be Apple specific.  I transferred the R script with the 
svg files between my Mac and a Windows 7 machine.  The svg files created 
on the Windows machine displayed properly on both machines. The svg 
files created on the Mac showed the same tiny fonts on both machines.


       Following David's suggestion, I tried 
svg('cex-svg-Helvetica.svg', family="Helvetica") and 
svg('cex-svg-serif.svg', family="serif") with otherwise the same script 
as before with the same results.


       I will repost this to r-sig-mac R <r-sig-mac using r-project.org>.


       Thanks again to Peter and David.
       Spencer Graves


#  From the Windows system:
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


On 2019-06-19 11:32, David Winsemius wrote:
>
> On 6/19/19 8:19 AM, Spencer Graves wrote:
>> Hello, All:
>>
>>
>>       I'm unable to control the font size in plots to svg. 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 open this in Gimp 2.10.4, the font size is tiny.  I also 
>> tried:
>>
>>
>> svg('cex-svg.svg', width=15, height=15, pointsize=24)
>> cex. <- 5
>> plot(1:2, cex.axis=cex.)
>> text(1:2, 1:2, c('as', 'DF'),
>>           cex=cex.)
>> dev.off()
>>
>>
>>       What do I do to control the font size in svg?
>
>
> I'm unable to reproduce. (I get very large fonts in all three viewing 
> methods: Rstudio plot panel, ImageViewer and GIMP)
>
> Ubuntu 18.04
>
> R 3.15.2
>
> Gimp 2.10.12
>
>
> Looking at ?svg makes me think you should be looking at the Cairo 
> Fonts section of ?X11.
>
>
> Best;
>
> David.
>
>>
>>
>>       Thanks,
>>       Spencer Graves
>>
>>
>> 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-devel using r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list