Changing fonts in plots


/ Published in: R
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # for quartz device...
  2. quartzFonts() # lists current mappings
  3.  
  4. # Add a mapping for Myriad:
  5. # pass in a vector of font filenames in the order: Plain, Bold, Italic, Bold-Italic
  6. quartzFonts(
  7. Myriad = quartzFont(
  8. c("MyriadPro-Regular", "MyriadPro-Semibold", "MyriadPro-It", "MyriadPro-SemiboldIt")
  9. )
  10. )
  11.  
  12. # Now we can call this family in a plot
  13. plot(c(1:10), c(2:11), family = "Myriad")

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.