knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
This package customizes ggplot2-plots for personal purposes. nicePlots
generates clean and simple plots with some support for customization. Special attention has gone to provide intuitive support for grouping to plot trends, histograms and densities for separate subgroups.
You can install the development version of nicePlots from GitHub with:
# install.packages("devtools") devtools::install_github("SZuzek/nicePlots")
A basic example how to plot visually appealing graphs with two groups.
library(nicePlots) niceLinePlot(mtcars, "disp", "hp", linetype = "vs", linetypelabels = c("V-shaped", "straight"), linename = "Engine", line_size = 1.2, xlab = "Displacement, in litres", ylab = "Miles per Gallon, Highway")
niceDensity
can be used to inspect distributions.
niceDensity(mtcars, "hp", color = "vs", fill = "vs", colorlabels = c("V-shaped", "straight"), colorname = "Engine", filllabels = c("V-shaped", "straight"), fillname = "Engine", xlab = "Miles per Gallon, Highway")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.