ggplt2S | R Documentation |
use ggplot2S!
ggplt2S( data, x, y = "NULL", size = "NULL", fill = "NULL", color = "NULL", shape = "NULL", alpha = "NULL", facetVar = "NULL", geom = c("box", "hist", "bar", "line", "jitter", "point", "smooth", "col")[1], labx = "x", laby = "y", title = "my Plot", theme = c("grey", "bw", "classic", "dark")[1], smoothMethod = c("lm", "glm", "loess", "gam")[1], barPos = c("stack", "dodge")[1], Bins = "NULL", Colour = "NULL", Fill = "NULL", Size = "NULL", Alpha = "NULL", Width = "NULL", Shape = "NULL" )
data |
data.frame |
x |
x vars. |
y |
y vars, could be NULL |
size |
variable mapping to size aes. |
fill |
variable mapping to fill aes. |
color |
variable mapping to color aes. |
shape |
variable mapping to shape aes. |
alpha |
variable mapping to alpha aes. |
facetVar |
variables used in faceting. |
geom |
geoms for ploting, eg: geom=c('point','smooth') |
labx |
x lable. |
laby |
y lable. |
title |
plot title. |
theme |
could be "grey","bw","classic","dark",etc. |
smoothMethod |
smoothing method used in a smooth line. |
barPos |
used when geom including "bar",could be "stack","dodge". |
Bins |
numeric value to set binwidth in a histogram plot. |
Colour |
setting colour, eg:Colour='red' |
Fill |
setting Fill colour. |
Size |
setting size of point, line,etc. |
Alpha |
setting transparency. |
Width |
setting width of barplot or boxplot. |
Shape |
setting shape. |
resGGplot ggplot.
resPlotly plot that's generated with ggplotly.
ggplt2S(data=mtcars,x='mpg',y='disp',size='wt',geom=c('point','smooth'),smoothMethod='lm',theme='bw',title='my plot')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.