leeper / slopegraph

Edward Tufte-Inspired Slopegraphs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

svglite and rsvg offer new potential

timelyportfolio opened this issue · comments

The new tools svglite and rsvg provide us with some new potential for this package. Fortunately, I think it requires no changes to the existing slopegraph code. I'll work up some examples to demonstrate the new potential.

Thanks so much for this great package.

Here is a quick sample.

library(rsvg)
library(svglite)
library(slopegraph)

data(cancer)

svglite("cancer_slope.svg", height=12, width=10)
slopegraph(cancer, col.line='gray', xlim=c(-.5,5.5), binval=2.5, 
             labels=c('5 Year','10 Year','15 Year','20 Year'))
dev.off()

rsvg_png("cancer_slope.svg","cancer_slope.png")

cancer_slope

Ooh, want to send a Pull Request?
On Mar 2, 2016 9:26 PM, "timelyportfolio" notifications@github.com wrote:

Here is a quick sample.

library(rsvg)
library(svglite)
library(slopegraph)

data(cancer)

svglite("cancer_slope.svg", height=12, width=10)
slopegraph(cancer, col.line='gray', xlim=c(-.5,5.5), binval=2.5,
labels=c('5 Year','10 Year','15 Year','20 Year'))
dev.off()

rsvg_png("cancer_slope.svg","cancer_slope.png")

[image: cancer_slope]
https://cloud.githubusercontent.com/assets/837910/13475939/14564b56-e08b-11e5-9d36-b7adfd01b3f0.png


Reply to this email directly or view it on GitHub
#9 (comment).

Just implemented this in the README. Thanks, again!