svg: render svg

Description Usage Arguments Examples

View source: R/render_svg.R

Description

create svg document from gsplot object

Usage

1
svg(object, ...)

Arguments

object

a gsplot object

...

additional args passed to svg.gsplot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
library(gsplot)
gs <- gsplot() %>% 
   points(y=1:11, x=1:11, 
            col="blue", pch=18, hovertext=paste0('text:',1:11), xlab='pizza', ylab='dogs', 
            id=paste0('point',1:11), 'fill-opacity'='0.3', 'stroke-opacity'=seq(0,1, length.out = 11)) %>% 
   points(x=4:11, y=11:4, 
            col="red", pch=1, hovertext=paste0('text:',11:4)) %>% 
   points(3:5,4:6,side=c(1,4), col='green', hovertext='green', pch=14, ylab='cats') %>% 
   lines(2:4, c(2,2.6,2.3), col='blue') %>% 
   axis(side=1, at = c(3,6.5,8.6))
svg(gs)

## End(Not run)

jread-usgs/dinosvg documentation built on May 20, 2019, 10:46 a.m.