Skip to content

darwinanddavis/plot_it

Repository files navigation

plot_it function

R version: 3.5.0

Overview

Plotting function for switching between manuscript-ready and presentation style plots in R.

Directions

1️⃣ In your R file, run the following code.

require(RCurl)
script <- getURL("https://raw.githubusercontent.com/darwinanddavis/plot_it/master/plot_it.R", ssl.verifypeer = FALSE)
eval(parse(text = script))

2️⃣ Use the following function to set your plotting parameters.

  • Specify if plotting for a manuscript or seminar (0/1)
  • Specify background colour (char)
  • Specify plotting colour palette 1 from RColorBrewer (char)
  • Specify plotting colour palette 2 from RColorBrewer (char)
  • Specify alpha transparency for plot points (int)
  • Specify font family for plot text (char)
require(RColorBrewer)
display.brewer.all()
# Set global plotting parameters
cat("plot_it( \n0 for presentation, 1 for manuscript, \nset colour for background, \nset colour palette 1. use 'display.brewer.all()', \nset colour palette 2. use 'display.brewer.all()', \nset alpha for colour transperancy, \nset font style \n)")

plot_it(0, "blue", "Spectral", "Greens", 1, "mono")  # set plot function params       
plot_it_gg("black", "white")  # specify background and foreground colours   

3️⃣ Make cool graphs.

Maintainer

Matt Malishev
🔍 Website
🐦 @darwinanddavis Follow @darwinanddavis
📧 matthew.malishev [at] gmail.com

About

Plotting function for switching between manuscript-ready and presentation style plots in R

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages