File: jet.colors.R

package info (click to toggle)
r-cran-matlab 1.0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 640 kB
  • sloc: sh: 13; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 757 bytes parent folder | download | duplicates (2)
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
###
### $Id: jet.colors.R 22 2022-05-30 18:03:47Z proebuck $
###


##-----------------------------------------------------------------------------
test.jet.colors <- function(input, expected) {
    output <- do.call(getFromNamespace("jet.colors", "matlab"), input)
    identical(output, expected)
}

jet.expected.m0 <- character(0)
jet.expected.m1 <- "#00FFFF"
jet.expected.m8 <- c("#0000FF",
                     "#0080FF",
                     "#00FFFF",
                     "#80FF80",
                     "#FFFF00",
                     "#FF8000",
                     "#FF0000",
                     "#800000")

test.jet.colors(list(n = 0), jet.expected.m0)
test.jet.colors(list(n = 1), jet.expected.m1)
test.jet.colors(list(n = 8), jet.expected.m8)