ggplt2S: ggplt2S

Description Usage Arguments Value Examples

View source: R/ggplt.R

Description

use ggplot2S!

Usage

1
2
3
4
5
6
7
8
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")[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")

Arguments

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.

Value

resGGplot ggplot.

resPlotly plot that's generated with ggplotly.

Examples

1
ggplt2S(data=mtcars,x='mpg',y='disp',size='wt',geom=c('point','smooth'),smoothMethod='lm',theme='bw',title='my plot')

sontron/madis documentation built on March 23, 2021, 10:17 p.m.