Description Usage Arguments Details Value See Also Examples
icesLogo.R Adds ICES logo to a base R plot
1 |
logoType |
= c("acronym", "fullText"), x, y, size, alpha = 1 |
none
none
none
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | ## Not run:
needList <- c("png")
new.packages <- needList[!(needList %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
library(png)
width <- 172.4
height <- 162.6
rows <- 2
cols <- 1
png(filename = "~/TESTlogo.png",
width = width,
height = height,
units = "mm",
res = 600)
par(mar = c(2.15, 2.25, 0.45, 0.25),
mfrow = c(rows, cols),
oma = c(0, 0, 1.25, 0),
mgp = c(3, .35, 0),
tck = -0.01,
family = "Calibri")
plot(1:2,type="n")
icesLogo(logoType = "acronym", x = 0.1, y = 0.9, size = .25, alpha = 1)
plot(1:2,type="n")
icesLogo(logoType = "fullText", x = 0.5, y = 0.5, size = 1, alpha = .1)
dev.off()
# devtools::install_github("ices-dk/rICES")
library(rICES)
library(extrafont)
library(png)
library(RCurl)
icesOrange <- "#F15D2A"
png(filename = "~/git/ices-dk/rICES/rICESlogo.png",
width = 25.4,
height = 25.4,
units = "mm",
res = 600)
par(mar = c(0, 0, 0, 0),
oma = c(0, 0, 0, 0),
family = "Calibri", # requires library(extrafont), but matches ICES Advice format
mgp = c(3, .35, 0))
plot(x = 0.55, y = 0.5, type="p", pch = "R", cex = 9,
col = icesOrange, xlim = c(0,1), ylim = c(0,1),
axes = F, bty = "n")
icesLogo(logoType = "acronym", x = 0.5, y = 0.5, size = .55, alpha = .9)
#
dev.off()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.