A serie of cool barplots based in ggplot2 package
devtools::install_github("arthur-rocha/Coolbarplots")
point_barplot
A barplot made of randomly generated points.library(CoolBarplots)
x= LETTERS[1:3]
y= sample(50:200,size=3,replace=T)
point_barplot(x,y)
line_barplot
A barplot made of randomly generated lines.library(CoolBarplots)
x= LETTERS[1:3]
y= sample(50:200,size=3,replace=T)
line_barplot(x,y)
number_barplot
A barplot made of frequency numbers.library(CoolBarplots)
x= LETTERS[1:3]
y= sample(5:20,size=3,replace=T)
number_barplot(x,y)
As this package is ggplot2
based, the same function ggsave()
can be used to save the plots.
library(CoolBarplots)
library(ggplot2)
x= LETTERS[1:3]
y= sample(5:20,size=3,replace=T)
p=number_barplot(x,y)
ggsave(p,"myplot.png",width = 6.9,height = 4.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.