icesLogo: icesLogo.R Adds ICES logo to a base R plot

Description Usage Arguments Details Value See Also Examples

View source: R/icesLogo.R

Description

icesLogo.R Adds ICES logo to a base R plot

Usage

1
(logoType = c("acronym", "fullText"), x, y, size, alpha = 1)

Arguments

logoType

= c("acronym", "fullText"), x, y, size, alpha = 1

Details

none

Value

none

See Also

none

Examples

 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")
 (logoType = "acronym", x = 0.1, y = 0.9, size = .25, alpha = 1)
 plot(1:2,type="n")
 (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")
(logoType = "acronym", x = 0.5, y = 0.5, size = .55, alpha = .9)
#
dev.off()



## End(Not run)

ices-tools-dev/rICES documentation built on May 18, 2019, 1:30 a.m.