Package svglite. November 4, 2016

Similar documents
Package tikzdevice. February 20, 2015

Package ggrepel. February 8, 2016

Package sendmailr. February 20, 2015

Package urltools. October 11, 2015

Package decompr. August 17, 2016

Package OECD. R topics documented: January 17, Type Package Title Search and Extract Data from the OECD Version 0.2.

Package retrosheet. April 13, 2015

Package searchconsoler

Package tagcloud. R topics documented: July 3, 2015

Package LexisPlotR. R topics documented: April 4, Type Package

Package optirum. December 31, 2015

Package uptimerobot. October 22, 2015

Package png. February 20, 2015

Package DCG. R topics documented: June 8, Type Package

Package syuzhet. February 22, 2015

Package TSfame. February 15, 2013

Package packrat. R topics documented: March 28, Type Package

Package rivr. October 16, 2015

Package wordnet. January 6, 2016

Package mcmcse. March 25, 2016

Package ChannelAttribution

Package bigdata. R topics documented: February 19, 2015

Package jrvfinance. R topics documented: October 6, 2015

Package RIGHT. March 30, 2015

A Basic Summary of Image Formats

Package empiricalfdr.deseq2

Package fractional. February 15, 2016

Package erp.easy. September 26, 2015

Digital Commons Design Customization Guide

Package whoapi. R topics documented: June 26, Type Package Title A 'Whoapi' API Client Version Date Author Oliver Keyes

Each function call carries out a single task associated with drawing the graph.

Package rvest. R topics documented: June 17, Version Title Easily Harvest (Scrape) Web Pages

Package hive. January 10, 2011

Package SHELF. February 5, 2016

Package hive. July 3, 2015

Package wordcloud. R topics documented: February 20, 2015

Package httprequest. R topics documented: February 20, 2015

Package R4CDISC. September 5, 2015

CSC 120: Computer Science for the Sciences (R section)

1 Strategic Planning Matrix v1,0 User s Guide

Writing R packages. Tools for Reproducible Research. Karl Broman. Biostatistics & Medical Informatics, UW Madison

Package hoarder. June 30, 2015

Package cgdsr. August 27, 2015

Package date. R topics documented: February 19, Version Title Functions for handling dates. Description Functions for handling dates.

Package gazepath. April 1, 2015

Package bigrf. February 19, 2015

TIBCO Spotfire Automation Services 6.5. User s Manual

Package EasyHTMLReport

Package pdfetch. R topics documented: July 19, 2015

Package MBA. February 19, Index 7. Canopy LIDAR data

Package pxr. February 20, 2015

PLAY VIDEO. Close- Closes the file you are working on and takes you back to MicroStation V8i Open File dialog.

Package VideoComparison

Modern PHP Graphics with Cairo. Michael Maclean FrOSCon 2011

Package bizdays. March 13, 2015

Writing reproducible reports

Package AzureML. August 15, 2015

Package dggridr. August 29, 2016

Package WikipediR. January 13, 2016

Package hazus. February 20, 2015

Package treemap. October 14, 2015

Multimedia-Programmierung Übung 5

Scatter Plots with Error Bars

Website Builder Overview

HTML, CSS, XML, and XSL

Package PACVB. R topics documented: July 10, Type Package

Fundamentals of Web Design (One Semester)

Package franc. R topics documented: November 12, Title Detect the Language of Text Version 1.1.1

Lesson Review Answers

Package GEOquery. August 18, 2015

Web Design Basics. Cindy Royal, Ph.D. Associate Professor Texas State University

Writing R Extensions. Version ( ) R Core Team

Version of Barcode Toolbox adds support for Adobe Illustrator CS

aarhus MicroStation Print Organizer V8i-SS3 Your Technology Advantage Spring 2013 Jeanne Aarhus

Study of GML-Based Geographical Data Visualization Strategy

When older typesetting methods gave

Package BioFTF. February 18, 2016

To be productive in today s graphic s industry, a designer, artist, or. photographer needs to have some basic knowledge of various file

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Visual Communication Program Assessment Revised Graphic Design Portfolio Checklist/Assessment

Package benford.analysis

We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.

Package StockChina. January 30, 2016

Introduction to Drupal

Package snp.plotter. February 20, 2015

Marketing. Best Practices

HTML5 & CSS3. ( What about SharePoint? ) presented

Getting Started with R and RStudio 1

Using Adobe Dreamweaver CS4 (10.0)

NemID JS Developer Support site. Guidelines

Geographic Data Visualization Using Open-Source Data & R. Christopher N. Lawrence Texas A&M International University - Laredo, Texas

Adobe Training Services Exam Guide. ACE: Illustrator CS6

Basics of HTML (some repetition) Cascading Style Sheets (some repetition) Web Design

WebCT 4.x: HTML Editor

Using this Brand Guide

Package robfilter. R topics documented: February 20, Version 4.1 Date Title Robust Time Series Filters

SellerDeck 2014 Responsive Design Guide

Using and creating Crosstabs in Crystal Reports Juri Urbainczyk

XML. CIS-3152, Spring 2013 Peter C. Chapin

Create Your own Company s Design Theme

Transcription:

Version 1.2.0 Title An 'SVG' Graphics Device Package svglite November 4, 2016 A graphics device for R that produces 'Scalable Vector Graphics'. 'svglite' is a fork of the older 'RSvgDevice' package. Encoding UTF-8 Depends R (>= 3.0.0) Imports Rcpp, gdtools (>= 0.1.1) LinkingTo Rcpp, gdtools, BH Suggests htmltools, testthat, xml2 (>= 1.0.0), covr, fontquiver (>= 0.2.0), knitr, rmarkdown License GPL (>= 2) URL https://github.com/hadley/svglite BugReports https://github.com/hadley/svglite/issues RoxygenNote 5.0.1 VignetteBuilder knitr NeedsCompilation yes Author Hadley Wickham [aut], Lionel Henry [aut, cre], T Jake Luciani [aut], Matthieu Decorde [aut], Vaudor Lise [aut], Tony Plate [ctb] (Early line dashing code), David Gohel [ctb] (Line dashing code and raster code), Yixuan Qiu [ctb] (Improved styles; polypath implementation), Håkon Malmedal [ctb] (Opacity code), RStudio [cph] Maintainer Lionel Henry <lionel@rstudio.com> Repository CRAN Date/Publication 2016-11-04 00:40:15 1

2 editsvg R topics documented: editsvg........................................... 2 htmlsvg.......................................... 3 stringsvg.......................................... 3 svglite............................................ 4 svgstring........................................... 5 xmlsvg........................................... 6 Index 8 editsvg Run plotting code and open svg in OS/system default svg viewer or editor. This is useful primarily for testing or post-processing the SVG. editsvg(code,..., width = NA, height = NA) code Plotting code to execute.... Other arguments passed on to svglite. width height if (interactive()) { editsvg(plot(1:10)) editsvg(contour(volcano)) }

htmlsvg 3 htmlsvg Run plotting code and view svg in RStudio Viewer or web broswer. This is useful primarily for testing. Requires the htmltools package. htmlsvg(code,...) code Plotting code to execute.... Other arguments passed on to svglite. if (require("htmltools")) { htmlsvg(plot(1:10)) htmlsvg(hist(rnorm(100))) } stringsvg Run plotting code and return svg as string This is useful primarily for testing but can be used as an alternative to svgstring(). stringsvg(code,...) code Plotting code to execute.... Other arguments passed on to svglite. stringsvg(plot(1:10))

4 svglite svglite An SVG Graphics Driver This function produces graphics compliant to the current w3 svg XML standard. The driver output is currently NOT specifying a DOCTYPE DTD. svglite(file = "Rplots.svg", width = 10, height = 8, bg = "white", pointsize = 12, standalone = TRUE, system_fonts = list(), user_fonts = list()) file height, width bg pointsize standalone system_fonts user_fonts The file where output will appear. Default background color for the plot (defaults to "white"). Default point size. Produce a standalone svg file? If FALSE, omits xml header and default namespace. Named list of font names to be aliased with fonts installed on your system. If unspecified, the R default families sans, serif, mono and symbol are aliased to the family returned by match_family(). Named list of fonts to be aliased with font files provided by the user rather than fonts properly installed on the system. The aliases can be fonts from the fontquiver package, strings containing a path to a font file, or a list containing name and file elements with name indicating the font alias in the SVG output and file the path to a font file. Details svglite provides two ways of controlling fonts: system fonts aliases and user fonts aliases. Supplying a font alias has two effects. First it determines the font-family property of all text anchors in the SVG output. Secondly, the font is used to determine the dimensions of graphical elements and has thus an influence on the overall aspect of the plots. This means that for optimal display, the font must be available on both the computer used to create the svg, and the computer used to render the svg. See the fonts vignette for more information. Author(s) This driver was written by T Jake Luciani <jakeluciani@yahoo.com> 2012: updated by Matthieu Decorde <matthieu.decorde@ens-lyon.fr>

svgstring 5 References See Also W3C Scalable Vector Graphics (SVG): http://www.w3.org/graphics/svg/overview.htm8 pictex, postscript, Devices # Save to file svglite("rplots.svg") plot(1:11, (-5:5)^2, type = 'b', main = "Simple Example") dev.off() # Supply system font aliases. First check the font can be located: gdtools::match_family("verdana") # Then supply a list of aliases: fonts <- list(sans = "Verdana", mono = "Times New Roman") svglite("rplots.svg", system_fonts = fonts) plot.new() text(0.5, 0.5, "Some text", family = "mono") dev.off() # See the fonts vignettes for more options to deal with fonts svgstring Access current SVG as a string. This is a variation on svglite that makes it easy to access the current value as a string. svgstring(width = 10, height = 8, bg = "white", pointsize = 12, standalone = TRUE, system_fonts = list(), user_fonts = list()) width height bg pointsize standalone Default background color for the plot (defaults to "white"). Default point size. Produce a standalone svg file? If FALSE, omits xml header and default namespace.

6 xmlsvg system_fonts user_fonts Named list of font names to be aliased with fonts installed on your system. If unspecified, the R default families sans, serif, mono and symbol are aliased to the family returned by match_family(). Named list of fonts to be aliased with font files provided by the user rather than fonts properly installed on the system. The aliases can be fonts from the fontquiver package, strings containing a path to a font file, or a list containing name and file elements with name indicating the font alias in the SVG output and file the path to a font file.... passed on to svglite. Details See svglite() documentation for information about specifying fonts. Value A function with no arguments: call the function to get the current value of the string. s <- svgstring(); s() plot.new(); s(); text(0.5, 0.5, "Hi!"); s() dev.off() s <- svgstring() plot(rnorm(5), rnorm(5)) s() dev.off() xmlsvg Run plotting code and return svg This is useful primarily for testing. Requires the xml2 package. xmlsvg(code,..., standalone = FALSE, height = 7, width = 7)

xmlsvg 7 Value code Plotting code to execute.... Other arguments passed on to svglite. standalone height width A xml2::xml_document object. Produce a standalone svg file? If FALSE, omits xml header and default namespace. if (require("xml2")) { x <- xmlsvg(plot(1, axes = FALSE)) x xml_find_all(x, ".//text") }

Index Topic device svglite, 4 Devices, 5 editsvg, 2 htmlsvg, 3 match_family, 4, 6 pictex, 5 postscript, 5 stringsvg, 3 svglite, 2, 3, 4, 5 7 svgstring, 3, 5 xmlsvg, 6 8