All Projects → ropensci-archive → styles

ropensci-archive / styles

Licence: other
Custom themes for base plots

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to styles

miner
R package for controlling Minecraft via API
Stars: ✭ 74 (+131.25%)
Mutual labels:  rstats, r-package, unconf
pkgreviewr
R package to facilitate rOpenSci package reviews.
Stars: ✭ 35 (+9.38%)
Mutual labels:  rstats, r-package, unconf
realtime
No description or website provided.
Stars: ✭ 15 (-53.12%)
Mutual labels:  r-package, ozunconf17, unconf
checkers
⛔ ARCHIVED ⛔ Automated checking of best practices for research compendia ✔️
Stars: ✭ 53 (+65.63%)
Mutual labels:  rstats, r-package, unconf
rcheatsheet
⛔ ARCHIVED ⛔ A package to create cheatsheets
Stars: ✭ 33 (+3.13%)
Mutual labels:  r-package, unconf
geoparser
⛔ ARCHIVED ⛔ R package for the Geoparser.io API
Stars: ✭ 38 (+18.75%)
Mutual labels:  rstats, r-package
dirdf
R package: dirdf - Extracts Metadata from Directory and File Names
Stars: ✭ 57 (+78.13%)
Mutual labels:  r-package, unconf
gendercoder
Creating R package to code free text gender responses
Stars: ✭ 48 (+50%)
Mutual labels:  r-package, unconf
gdoc
⛔ ARCHIVED ⛔ An R Markdown Template for Google Docs
Stars: ✭ 30 (-6.25%)
Mutual labels:  r-package, unconf
middlechild
⛔ ARCHIVED ⛔ Tools to Intercept, Validate and Consume Web/Network Traffic
Stars: ✭ 15 (-53.12%)
Mutual labels:  r-package, unconf
travis
⛔ ARCHIVED ⛔ Set Up 'Travis' for Testing and Deployment
Stars: ✭ 61 (+90.63%)
Mutual labels:  rstats, r-package
heddlr
Bring a functional programming mindset to R Markdown document generation
Stars: ✭ 14 (-56.25%)
Mutual labels:  rstats, r-package
ropsec
㊙️ Operations security for R developers
Stars: ✭ 27 (-15.62%)
Mutual labels:  r-package, unconf
mchtoolbox
⛔ ARCHIVED ⛔ What the Package Does (Title Case)
Stars: ✭ 13 (-59.37%)
Mutual labels:  r-package, unconf
nasapower
API Client for NASA POWER Global Meteorology, Surface Solar Energy and Climatology in R
Stars: ✭ 79 (+146.88%)
Mutual labels:  rstats, r-package
dataspice
🌶️ Create lightweight schema.org descriptions of your datasets
Stars: ✭ 151 (+371.88%)
Mutual labels:  r-package, unconf
mikropml
User-Friendly R Package for Supervised Machine Learning Pipelines
Stars: ✭ 34 (+6.25%)
Mutual labels:  rstats, r-package
cranlogs
Download Logs from the RStudio CRAN Mirror
Stars: ✭ 70 (+118.75%)
Mutual labels:  rstats, r-package
cusumcharter
Easier CUSUM control charts. Returns simple CUSUM statistics, CUSUMs with control limit calculations, and function to generate faceted CUSUM Control Charts
Stars: ✭ 17 (-46.87%)
Mutual labels:  rstats, r-package
rwalkable
⛔ ARCHIVED ⛔ Walkability Scores
Stars: ✭ 14 (-56.25%)
Mutual labels:  r-package, unconf

styles

The goal of styles is to create and apply themes to base plots.

Installation

You can install styles from github with:

# install.packages("devtools")
devtools::install_github("ropenscilabs/styles")

Examples

Let's compare default plot arguments to a styles:

library(styles)
library(default)

plot_mat <- matrix(1:8, nrow = 2, byrow = FALSE)
layout(plot_mat)

# plot with plot defaults; without setting a style
example_plots()

# plot with a style
style(better)
example_plots()

You can preview internal styles:

plot_style(better)

You can create your own styles:

blue_stars <- new_style(par = list(pch = 8),
                  graphics = list(plot.xy = list(col = "navyblue")))
style(blue_stars)
plot(mpg ~ wt, data = mtcars)

Once we have a style we like, we can apply it to all of our plots:

blue_dot_grey <- new_style(par = list(pch = 20,
                                      cex=1.2,
                                      bty="l",
                                      col.axis = grey(0.4),
                                      col.lab = grey(0.4),
                                      fg = grey(0.4),
                                      mar=c(4,4,1,1)),
                           graphics = list(plot.xy = list(col = "navyblue")))

style(blue_dot_grey)

plot_mat <- matrix(1:4, nrow = 2, byrow = FALSE)
layout(plot_mat)
plot(mpg ~ wt, data = mtcars)
plot(mpg ~ disp, data = mtcars)
plot(mpg ~ hp, data = mtcars)
plot(mpg ~ drat, data = mtcars)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].