Skip to content

Instantly share code, notes, and snippets.

View kenkellner's full-sized avatar

Ken Kellner kenkellner

View GitHub Profile
@scrogster
scrogster / logo_add.r
Last active April 13, 2021 11:38
Adding a png logo to an R plot
library(png)
library(RCurl)
#I got these free png silhouettes of red fox and rabbit from phylopic.org
foxurl<-"http://phylopic.org/assets/images/submissions/51b1b6e4-129d-41a6-bbbd-c3fab459c25f.1024.png"
raburl<-"http://phylopic.org/assets/images/submissions/1e15411c-5394-4a9d-a209-76c8ac0c331d.1024.png"
fox_logo <- readPNG(getURLContent(foxurl))
rab_logo <- readPNG(getURLContent(raburl))
#utility function for embedding png images at specified fractional sizes in R plots
#places the logo centred on a specified fraction of the the usr space,
@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}