ggplot2.customize: Customize a graph generated by ggplot2 package (axis, title,...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Customize a graph generated by ggplot2 package

Usage

1

Arguments

plot

A plot object generated with ggplot2 or easyGgplot2 packages (boxplot, densityplot, histogram, dotplot, ....)

...

Any argument from the list of the arguments indicated below.

Details

Value

a ggplot

Author(s)

Alboukadel Kassambara <alboukadel.kassambara@gmail.com>

References

http://www.sthda.com

See Also

ggplot2.dotplot, ggplot2.violinplot, ggplot2.stripchart, ggplot2.boxplot, ggplot2.histogram, ggplot2.density

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#data
set.seed(1234)
df <- data.frame(grp = factor( rep(c("A","B"), each=200) ),
                   var = c(rnorm(200),rnorm(200, mean=.8)))

#use ggplot2.customize to customize the plot
plot<-ggplot2.density(data=df, xName='var',groupName='grp', groupColors=c('#999999','#E69F00'))
print(plot)

plot<-ggplot2.customize(plot, mainTitle="Plot of variable histogram \nper group",
                        xtitle="Variable", ytitle="Density")
print(plot)

YTLogos/easyGgplot2 documentation built on May 3, 2019, 9:03 p.m.