Command:
> installed.packages()
Result:
Package
RColorBrewer "RColorBrewer"
Rcpp "Rcpp"
colorspace "colorspace"
dichromat "dichromat"
digest "digest"
ggplot2 "ggplot2"
gridExtra "gridExtra"
gtable "gtable"
labeling "labeling"
magrittr "magrittr"
mapproj "mapproj"
maps "maps"
munsell "munsell"
plyr "plyr"
reshape2 "reshape2"
scales "scales"
scatterplot3d "scatterplot3d"
stringi "stringi"
stringr "stringr"
viridis "viridis"
KernSmooth "KernSmooth"
MASS "MASS"
Matrix "Matrix"
base "base"
boot "boot"
class "class"
cluster "cluster"
codetools "codetools"
compiler "compiler"
datasets "datasets"
foreign "foreign"
grDevices "grDevices"
graphics "graphics"
grid "grid"
lattice "lattice"
methods "methods"
mgcv "mgcv"
nlme "nlme"
nnet "nnet"
parallel "parallel"
rpart "rpart"
spatial "spatial"
splines "splines"
stats "stats"
stats4 "stats4"
survival "survival"
tcltk "tcltk"
tools "tools"
utils "utils"
LibPath
RColorBrewer "/usr/local/lib/R/3.3/site-library"
Rcpp "/usr/local/lib/R/3.3/site-library"
colorspace "/usr/local/lib/R/3.3/site-library"
dichromat "/usr/local/lib/R/3.3/site-library"
digest "/usr/local/lib/R/3.3/site-library"
ggplot2 "/usr/local/lib/R/3.3/site-library"
gridExtra "/usr/local/lib/R/3.3/site-library"
gtable "/usr/local/lib/R/3.3/site-library"
labeling "/usr/local/lib/R/3.3/site-library"
magrittr "/usr/local/lib/R/3.3/site-library"
mapproj "/usr/local/lib/R/3.3/site-library"
maps "/usr/local/lib/R/3.3/site-library"
munsell "/usr/local/lib/R/3.3/site-library"
plyr "/usr/local/lib/R/3.3/site-library"
reshape2 "/usr/local/lib/R/3.3/site-library"
scales "/usr/local/lib/R/3.3/site-library"
scatterplot3d "/usr/local/lib/R/3.3/site-library"
stringi "/usr/local/lib/R/3.3/site-library"
stringr "/usr/local/lib/R/3.3/site-library"
viridis "/usr/local/lib/R/3.3/site-library"
KernSmooth "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
MASS "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
Matrix "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
base "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
boot "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
class "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
cluster "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
codetools "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
compiler "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
datasets "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
foreign "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
grDevices "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
graphics "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
grid "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
lattice "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
methods "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
mgcv "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
nlme "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
nnet "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
parallel "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
rpart "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
spatial "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
splines "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
stats "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
stats4 "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
survival "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
tcltk "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
tools "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
utils "/usr/local/Cellar/r/3.3.1_3/R.framework/Versions/3.3/Resources/library"
Version Priority
RColorBrewer "1.1-2" NA
Rcpp "0.12.7" NA
colorspace "1.2-7" NA
dichromat "2.0-0" NA
digest "0.6.10" NA
ggplot2 "2.1.0" NA
gridExtra "2.2.1" NA
gtable "0.2.0" NA
labeling "0.3" NA
magrittr "1.5" NA
mapproj "1.2-4" NA
maps "3.1.1" NA
munsell "0.4.3" NA
plyr "1.8.4" NA
reshape2 "1.4.1" NA
scales "0.4.0" NA
scatterplot3d "0.3-37" NA
stringi "1.1.2" NA
stringr "1.1.0" NA
viridis "0.3.4" NA
KernSmooth "2.23-15" "recommended"
MASS "7.3-45" "recommended"
Matrix "1.2-6" "recommended"
base "3.3.1" "base"
boot "1.3-18" "recommended"
class "7.3-14" "recommended"
cluster "2.0.4" "recommended"
codetools "0.2-14" "recommended"
compiler "3.3.1" "base"
datasets "3.3.1" "base"
foreign "0.8-66" "recommended"
grDevices "3.3.1" "base"
graphics "3.3.1" "base"
grid "3.3.1" "base"
lattice "0.20-33" "recommended"
methods "3.3.1" "base"
mgcv "1.8-12" "recommended"
nlme "3.1-128" "recommended"
nnet "7.3-12" "recommended"
parallel "3.3.1" "base"
rpart "4.1-10" "recommended"
spatial "7.3-11" "recommended"
splines "3.3.1" "base"
stats "3.3.1" "base"
stats4 "3.3.1" "base"
survival "2.39-4" "recommended"
tcltk "3.3.1" "base"
tools "3.3.1" "base"
utils "3.3.1" "base"
Depends
RColorBrewer "R (>= 2.0.0)"
Rcpp "R (>= 3.0.0)"
colorspace "R (>= 2.13.0), methods"
dichromat "R (>= 2.10), stats"
digest "R (>= 2.4.1)"
ggplot2 "R (>= 3.1)"
gridExtra NA
gtable "R (>= 2.14)"
labeling NA
magrittr NA
mapproj "maps (>= 2.3-0)"
maps "R (>= 2.14.0)"
munsell NA
plyr "R (>= 3.1.0)"
reshape2 NA
scales "R (>= 2.13)"
scatterplot3d "R (>= 2.7.0)"
stringi "R (>= 2.13.1)"
stringr "R (>= 2.14)"
viridis "R (>= 2.10)"
KernSmooth "R (>= 2.5.0), stats"
MASS "R (>= 3.1.0), grDevices, graphics, stats, utils"
Matrix "R (>= 3.0.1)"
base NA
boot "R (>= 3.0.0), graphics, stats"
class "R (>= 3.0.0), stats, utils"
cluster "R (>= 3.0.1)"
codetools "R (>= 2.1)"
compiler NA
datasets NA
foreign "R (>= 3.0.0)"
grDevices NA
graphics NA
grid NA
lattice "R (>= 3.0.0)"
methods NA
mgcv "R (>= 2.14.0), nlme (>= 3.1-64)"
nlme "R (>= 3.0.2)"
nnet "R (>= 2.14.0), stats, utils"
parallel NA
rpart "R (>= 2.15.0), graphics, stats, grDevices"
spatial "R (>= 3.0.0), graphics, stats, utils"
splines NA
stats NA
stats4 NA
survival "R (>= 2.13.0)"
tcltk NA
tools NA
utils NA
Imports
RColorBrewer NA
Rcpp "methods, utils"
colorspace "graphics, grDevices"
dichromat NA
digest NA
ggplot2 "digest, grid, gtable (>= 0.1.1), MASS, plyr (>= 1.7.1),\nreshape2, scales (>= 0.3.0), stats"
gridExtra "gtable, grid, grDevices, graphics, utils"
gtable "grid"
labeling NA
magrittr NA
mapproj "stats, graphics"
maps "graphics, utils"
munsell "colorspace, methods"
plyr "Rcpp (>= 0.11.0)"
reshape2 "plyr (>= 1.8.1), stringr, Rcpp"
scales "RColorBrewer, dichromat, plyr, munsell (>= 0.2), labeling,\nmethods, Rcpp"
scatterplot3d "grDevices, graphics, stats"
stringi "tools, utils, stats"
stringr "stringi (>= 0.4.1), magrittr"
viridis "stats, grDevices, ggplot2 (>= 1.0.1), gridExtra"
KernSmooth NA
MASS "methods"
Matrix "methods, graphics, grid, stats, utils, lattice"
base NA
boot NA
class "MASS"
cluster "graphics, grDevices, stats, utils"
codetools NA
compiler NA
datasets NA
foreign "methods, utils, stats"
grDevices NA
graphics "grDevices"
grid "grDevices, utils"
lattice "grid, grDevices, graphics, stats, utils"
methods "utils, stats"
mgcv "methods, stats, graphics, Matrix"
nlme "graphics, stats, utils, lattice"
nnet NA
parallel "tools"
rpart NA
spatial NA
splines "graphics, stats"
stats "utils, grDevices, graphics"
stats4 "graphics, methods, stats"
survival "graphics, Matrix, methods, splines, stats, utils"
tcltk "utils"
tools NA
utils NA
LinkingTo
RColorBrewer NA
Rcpp NA
colorspace NA
dichromat NA
digest NA
ggplot2 NA
gridExtra NA
gtable NA
labeling NA
magrittr NA
mapproj NA
maps NA
munsell NA
plyr "Rcpp"
reshape2 "Rcpp"
scales "Rcpp"
scatterplot3d NA
stringi NA
stringr NA
viridis NA
KernSmooth NA
MASS NA
Matrix NA
base NA
boot NA
class NA
cluster NA
codetools NA
compiler NA
datasets NA
foreign NA
grDevices NA
graphics NA
grid NA
lattice NA
methods NA
mgcv NA
nlme NA
nnet NA
parallel NA
rpart NA
spatial NA
splines NA
stats NA
stats4 NA
survival NA
tcltk NA
tools NA
utils NA
Suggests
RColorBrewer NA
Rcpp "RUnit, inline, rbenchmark, highlight, pkgKitten (>= 0.1.2)"
colorspace "datasets, stats, utils, KernSmooth, MASS, kernlab, mvtnorm,\nvcd, dichromat, tcltk"
dichromat NA
digest "knitr, rmarkdown"
ggplot2 "covr, ggplot2movies, hexbin, Hmisc, lattice, mapproj, maps,\nmaptools, mgcv, multcomp, nlme, testthat (>= 0.11.0), quantreg,\nknitr, rpart, rmarkdown, svglite"
gridExtra "ggplot2, lattice, knitr, testthat"
gtable "testthat, covr"
labeling NA
magrittr "testthat, knitr"
mapproj NA
maps "mapproj (>= 1.2-0), mapdata (>= 2.2-4), sp, maptools"
munsell "ggplot2, testthat"
plyr "abind, testthat, tcltk, foreach, doParallel, itertools,\niterators, covr"
reshape2 "testthat (>= 0.8.0), lattice"
scales "testthat (>= 0.8), covr"
scatterplot3d NA
stringi NA
stringr "testthat, knitr, htmltools, htmlwidgets, rmarkdown, covr"
viridis "hexbin (>= 1.27.0), scales, MASS, knitr, dichromat,\ncolorspace, rasterVis, httr, mapproj"
KernSmooth "MASS"
MASS "lattice, nlme, nnet, survival"
Matrix "expm, MASS"
base "methods"
boot "MASS, survival"
class NA
cluster "MASS"
codetools NA
compiler NA
datasets NA
foreign NA
grDevices "KernSmooth"
graphics NA
grid "lattice"
lattice "KernSmooth, MASS"
methods "codetools"
mgcv "splines, parallel, survival, MASS"
nlme "Hmisc, MASS"
nnet "MASS"
parallel "methods"
rpart "survival"
spatial "MASS"
splines "Matrix, methods"
stats "MASS, Matrix, SuppDists, methods, stats4"
stats4 NA
survival NA
tcltk NA
tools "codetools, methods, xml2"
utils "methods, XML"
Enhances
RColorBrewer NA
Rcpp NA
colorspace NA
dichromat NA
digest NA
ggplot2 "sp"
gridExtra NA
gtable NA
labeling NA
magrittr NA
mapproj NA
maps NA
munsell NA
plyr NA
reshape2 NA
scales NA
scatterplot3d NA
stringi NA
stringr NA
viridis NA
KernSmooth NA
MASS NA
Matrix "MatrixModels, graph, SparseM, sfsmisc"
base NA
boot NA
class NA
cluster NA
codetools NA
compiler NA
datasets NA
foreign NA
grDevices NA
graphics NA
grid NA
lattice "chron"
methods NA
mgcv NA
nlme NA
nnet NA
parallel "snow, nws, Rmpi"
rpart NA
spatial NA
splines NA
stats NA
stats4 NA
survival NA
tcltk NA
tools NA
utils NA
License License_is_FOSS
RColorBrewer "Apache License 2.0" NA
Rcpp "GPL (>= 2)" NA
colorspace "BSD_3_clause + file LICENSE" NA
dichromat "GPL-2" NA
digest "GPL-2" NA
ggplot2 "GPL-2" NA
gridExtra "GPL (>= 2)" NA
gtable "GPL-2" NA
labeling "MIT + file LICENSE | Unlimited" NA
magrittr "MIT + file LICENSE" NA
mapproj "Lucent Public License" NA
maps "GPL-2" NA
munsell "MIT + file LICENSE" NA
plyr "MIT + file LICENSE" NA
reshape2 "MIT + file LICENSE" NA
scales "MIT + file LICENSE" NA
scatterplot3d "GPL-2" NA
stringi "file LICENSE" "yes"
stringr "GPL-2" NA
viridis "MIT + file LICENSE" NA
KernSmooth "Unlimited" NA
MASS "GPL-2 | GPL-3" NA
Matrix "GPL (>= 2) | file LICENCE" NA
base "Part of R 3.3.1" NA
boot "Unlimited" NA
class "GPL-2 | GPL-3" NA
cluster "GPL (>= 2)" NA
codetools "GPL" NA
compiler "Part of R 3.3.1" NA
datasets "Part of R 3.3.1" NA
foreign "GPL (>= 2)" NA
grDevices "Part of R 3.3.1" NA
graphics "Part of R 3.3.1" NA
grid "Part of R 3.3.1" NA
lattice "GPL (>= 2)" NA
methods "Part of R 3.3.1" NA
mgcv "GPL (>= 2)" NA
nlme "GPL (>= 2) | file LICENCE" NA
nnet "GPL-2 | GPL-3" NA
parallel "Part of R 3.3.1" NA
rpart "GPL-2 | GPL-3" NA
spatial "GPL-2 | GPL-3" NA
splines "Part of R 3.3.1" NA
stats "Part of R 3.3.1" NA
stats4 "Part of R 3.3.1" NA
survival "LGPL (>= 2)" NA
tcltk "Part of R 3.3.1" NA
tools "Part of R 3.3.1" NA
utils "Part of R 3.3.1" NA
License_restricts_use OS_type MD5sum NeedsCompilation Built
RColorBrewer NA NA NA "no" "3.3.1"
Rcpp NA NA NA "yes" "3.3.1"
colorspace NA NA NA "yes" "3.3.1"
dichromat NA NA NA NA "3.3.1"
digest NA NA NA "yes" "3.3.1"
ggplot2 NA NA NA "no" "3.3.1"
gridExtra NA NA NA "no" "3.3.1"
gtable NA NA NA "no" "3.3.1"
labeling NA NA NA "no" "3.3.1"
magrittr NA NA NA "no" "3.3.1"
mapproj NA NA NA "yes" "3.3.1"
maps NA NA NA "yes" "3.3.1"
munsell NA NA NA "no" "3.3.1"
plyr NA NA NA "yes" "3.3.1"
reshape2 NA NA NA "yes" "3.3.1"
scales NA NA NA "yes" "3.3.1"
scatterplot3d NA NA NA "no" "3.3.1"
stringi NA NA NA "yes" "3.3.1"
stringr NA NA NA "no" "3.3.1"
viridis NA NA NA "no" "3.3.1"
KernSmooth NA NA NA "yes" "3.3.1"
MASS NA NA NA "yes" "3.3.1"
Matrix NA NA NA "yes" "3.3.1"
base NA NA NA NA "3.3.1"
boot NA NA NA "no" "3.3.1"
class NA NA NA "yes" "3.3.1"
cluster NA NA NA "yes" "3.3.1"
codetools NA NA NA "no" "3.3.1"
compiler NA NA NA NA "3.3.1"
datasets NA NA NA NA "3.3.1"
foreign NA NA NA "yes" "3.3.1"
grDevices NA NA NA NA "3.3.1"
graphics NA NA NA NA "3.3.1"
grid NA NA NA NA "3.3.1"
lattice NA NA NA "yes" "3.3.1"
methods NA NA NA NA "3.3.1"
mgcv NA NA NA "yes" "3.3.1"
nlme NA NA NA "yes" "3.3.1"
nnet NA NA NA "yes" "3.3.1"
parallel NA NA NA NA "3.3.1"
rpart NA NA NA "yes" "3.3.1"
spatial NA NA NA "yes" "3.3.1"
splines NA NA NA NA "3.3.1"
stats NA NA NA NA "3.3.1"
stats4 NA NA NA NA "3.3.1"
survival NA NA NA "yes" "3.3.1"
tcltk NA NA NA NA "3.3.1"
tools NA NA NA NA "3.3.1"
utils NA NA NA NA "3.3.1"
Thursday, October 20, 2016
R (programming language): List of Demos for Attached Packages
Command:
Result:
Demos in package 'base':
error.catching More examples on catching and handling errors
is.things Explore some properties of R objects and
is.FOO() functions. Not for newbies!
recursion Using recursion for adaptive integration
scoping An illustration of lexical scoping.
Demos in package 'grDevices':
colors A show of R's predefined colors()
hclColors Exploration of hcl() space
Demos in package 'graphics':
Hershey Tables of the characters in the Hershey vector
fonts
Japanese Tables of the Japanese characters in the
Hershey vector fonts
graphics A show of some of R's graphics capabilities
image The image-like graphics builtins of R
persp Extended persp() examples
plotmath Examples of the use of mathematics annotation
Demos in package 'stats':
glm.vr Some glm() examples from V&R with several
predictors
lm.glm Some linear and generalized linear modelling
examples from `An Introduction to Statistical
Modelling' by Annette Dobson
nlm Nonlinear least-squares using nlm()
smooth `Visualize' steps in Tukey's smoothers
Use 'demo(package = .packages(all.available = TRUE))'
to list the demos in all *available* packages.
(END)
R (programming language): Scatter Plot a Circle Using Viridis Color Maps
Command:
> t <- seq(from=0,to=1,length=100)*2*pi
> t
Result:
[1] 0.00000000 0.06346652 0.12693304 0.19039955 0.25386607 0.31733259
[7] 0.38079911 0.44426563 0.50773215 0.57119866 0.63466518 0.69813170
[13] 0.76159822 0.82506474 0.88853126 0.95199777 1.01546429 1.07893081
[19] 1.14239733 1.20586385 1.26933037 1.33279688 1.39626340 1.45972992
[25] 1.52319644 1.58666296 1.65012947 1.71359599 1.77706251 1.84052903
[31] 1.90399555 1.96746207 2.03092858 2.09439510 2.15786162 2.22132814
[37] 2.28479466 2.34826118 2.41172769 2.47519421 2.53866073 2.60212725
[43] 2.66559377 2.72906028 2.79252680 2.85599332 2.91945984 2.98292636
[49] 3.04639288 3.10985939 3.17332591 3.23679243 3.30025895 3.36372547
[55] 3.42719199 3.49065850 3.55412502 3.61759154 3.68105806 3.74452458
[61] 3.80799110 3.87145761 3.93492413 3.99839065 4.06185717 4.12532369
[67] 4.18879020 4.25225672 4.31572324 4.37918976 4.44265628 4.50612280
[73] 4.56958931 4.63305583 4.69652235 4.75998887 4.82345539 4.88692191
[79] 4.95038842 5.01385494 5.07732146 5.14078798 5.20425450 5.26772102
[85] 5.33118753 5.39465405 5.45812057 5.52158709 5.58505361 5.64852012
[91] 5.71198664 5.77545316 5.83891968 5.90238620 5.96585272 6.02931923
[97] 6.09278575 6.15625227 6.21971879 6.28318531
Command:
> x <- cbind(sin(t),cos(t))
> x
Result:
[,1] [,2]
[1,] 0.000000e+00 1.00000000
[2,] 6.342392e-02 0.99798668
[3,] 1.265925e-01 0.99195481
[4,] 1.892512e-01 0.98192870
[5,] 2.511480e-01 0.96794870
[6,] 3.120334e-01 0.95007112
[7,] 3.716625e-01 0.92836793
[8,] 4.297949e-01 0.90292654
[9,] 4.861967e-01 0.87384938
[10,] 5.406408e-01 0.84125353
[11,] 5.929079e-01 0.80527026
[12,] 6.427876e-01 0.76604444
[13,] 6.900790e-01 0.72373404
[14,] 7.345917e-01 0.67850941
[15,] 7.761465e-01 0.63055267
[16,] 8.145760e-01 0.58005691
[17,] 8.497254e-01 0.52722547
[18,] 8.814534e-01 0.47227107
[19,] 9.096320e-01 0.41541501
[20,] 9.341479e-01 0.35688622
[21,] 9.549022e-01 0.29692038
[22,] 9.718116e-01 0.23575894
[23,] 9.848078e-01 0.17364818
[24,] 9.938385e-01 0.11083820
[25,] 9.988673e-01 0.04758192
[26,] 9.998741e-01 -0.01586596
[27,] 9.968548e-01 -0.07924996
[28,] 9.898214e-01 -0.14231484
[29,] 9.788024e-01 -0.20480667
[30,] 9.638422e-01 -0.26647381
[31,] 9.450008e-01 -0.32706796
[32,] 9.223543e-01 -0.38634513
[33,] 8.959938e-01 -0.44406661
[34,] 8.660254e-01 -0.50000000
[35,] 8.325699e-01 -0.55392006
[36,] 7.957618e-01 -0.60560969
[37,] 7.557496e-01 -0.65486073
[38,] 7.126942e-01 -0.70147489
[39,] 6.667690e-01 -0.74526445
[40,] 6.181590e-01 -0.78605309
[41,] 5.670599e-01 -0.82367658
[42,] 5.136774e-01 -0.85798341
[43,] 4.582265e-01 -0.88883545
[44,] 4.009305e-01 -0.91610846
[45,] 3.420201e-01 -0.93969262
[46,] 2.817326e-01 -0.95949297
[47,] 2.203105e-01 -0.97542979
[48,] 1.580014e-01 -0.98743889
[49,] 9.505604e-02 -0.99547192
[50,] 3.172793e-02 -0.99949654
[51,] -3.172793e-02 -0.99949654
[52,] -9.505604e-02 -0.99547192
[53,] -1.580014e-01 -0.98743889
[54,] -2.203105e-01 -0.97542979
[55,] -2.817326e-01 -0.95949297
[56,] -3.420201e-01 -0.93969262
[57,] -4.009305e-01 -0.91610846
[58,] -4.582265e-01 -0.88883545
[59,] -5.136774e-01 -0.85798341
[60,] -5.670599e-01 -0.82367658
[61,] -6.181590e-01 -0.78605309
[62,] -6.667690e-01 -0.74526445
[63,] -7.126942e-01 -0.70147489
[64,] -7.557496e-01 -0.65486073
[65,] -7.957618e-01 -0.60560969
[66,] -8.325699e-01 -0.55392006
[67,] -8.660254e-01 -0.50000000
[68,] -8.959938e-01 -0.44406661
[69,] -9.223543e-01 -0.38634513
[70,] -9.450008e-01 -0.32706796
[71,] -9.638422e-01 -0.26647381
[72,] -9.788024e-01 -0.20480667
[73,] -9.898214e-01 -0.14231484
[74,] -9.968548e-01 -0.07924996
[75,] -9.998741e-01 -0.01586596
[76,] -9.988673e-01 0.04758192
[77,] -9.938385e-01 0.11083820
[78,] -9.848078e-01 0.17364818
[79,] -9.718116e-01 0.23575894
[80,] -9.549022e-01 0.29692038
[81,] -9.341479e-01 0.35688622
[82,] -9.096320e-01 0.41541501
[83,] -8.814534e-01 0.47227107
[84,] -8.497254e-01 0.52722547
[85,] -8.145760e-01 0.58005691
[86,] -7.761465e-01 0.63055267
[87,] -7.345917e-01 0.67850941
[88,] -6.900790e-01 0.72373404
[89,] -6.427876e-01 0.76604444
[90,] -5.929079e-01 0.80527026
[91,] -5.406408e-01 0.84125353
[92,] -4.861967e-01 0.87384938
[93,] -4.297949e-01 0.90292654
[94,] -3.716625e-01 0.92836793
[95,] -3.120334e-01 0.95007112
[96,] -2.511480e-01 0.96794870
[97,] -1.892512e-01 0.98192870
[98,] -1.265925e-01 0.99195481
[99,] -6.342392e-02 0.99798668
[100,] -2.449294e-16 1.00000000
Command:
> library(viridis)
> viridis(length(t))
Result:
[1] "#440154FF" "#450558FF" "#46085CFF" "#470D60FF" "#471063FF" "#481467FF"
[7] "#481769FF" "#481B6DFF" "#481E70FF" "#482173FF" "#482576FF" "#482878FF"
[13] "#472C7AFF" "#472F7CFF" "#46327EFF" "#453581FF" "#453882FF" "#443B84FF"
[19] "#433E85FF" "#424186FF" "#404587FF" "#3F4788FF" "#3E4A89FF" "#3D4D8AFF"
[25] "#3C508BFF" "#3B528BFF" "#39558CFF" "#38598CFF" "#375B8DFF" "#355E8DFF"
[31] "#34608DFF" "#33638DFF" "#32658EFF" "#31688EFF" "#2F6B8EFF" "#2E6D8EFF"
[37] "#2D708EFF" "#2C718EFF" "#2B748EFF" "#2A768EFF" "#29798EFF" "#287C8EFF"
[43] "#277E8EFF" "#26818EFF" "#26828EFF" "#25858EFF" "#24878EFF" "#238A8DFF"
[49] "#228D8DFF" "#218F8DFF" "#20928CFF" "#20938CFF" "#1F968BFF" "#1F998AFF"
[55] "#1E9B8AFF" "#1F9E89FF" "#1FA088FF" "#1FA287FF" "#20A486FF" "#22A785FF"
[61] "#24AA83FF" "#25AC82FF" "#28AE80FF" "#2BB07FFF" "#2EB37CFF" "#31B67BFF"
[67] "#35B779FF" "#39BA76FF" "#3DBC74FF" "#41BE71FF" "#47C06FFF" "#4CC26CFF"
[73] "#51C56AFF" "#56C667FF" "#5BC863FF" "#61CA60FF" "#67CC5CFF" "#6DCD59FF"
[79] "#73D056FF" "#78D152FF" "#7FD34EFF" "#85D54AFF" "#8CD646FF" "#92D741FF"
[85] "#99D83DFF" "#A0DA39FF" "#A7DB35FF" "#ADDC30FF" "#B4DE2CFF" "#BBDE28FF"
[91] "#C2DF23FF" "#C9E020FF" "#D0E11CFF" "#D7E219FF" "#DDE318FF" "#E4E419FF"
[97] "#EBE51AFF" "#F1E51DFF" "#F7E620FF" "#FDE725FF"
Command:
> plot(x,col=viridis(length(t)),pch=20)
Result:
> t <- seq(from=0,to=1,length=100)*2*pi
> t
Result:
[1] 0.00000000 0.06346652 0.12693304 0.19039955 0.25386607 0.31733259
[7] 0.38079911 0.44426563 0.50773215 0.57119866 0.63466518 0.69813170
[13] 0.76159822 0.82506474 0.88853126 0.95199777 1.01546429 1.07893081
[19] 1.14239733 1.20586385 1.26933037 1.33279688 1.39626340 1.45972992
[25] 1.52319644 1.58666296 1.65012947 1.71359599 1.77706251 1.84052903
[31] 1.90399555 1.96746207 2.03092858 2.09439510 2.15786162 2.22132814
[37] 2.28479466 2.34826118 2.41172769 2.47519421 2.53866073 2.60212725
[43] 2.66559377 2.72906028 2.79252680 2.85599332 2.91945984 2.98292636
[49] 3.04639288 3.10985939 3.17332591 3.23679243 3.30025895 3.36372547
[55] 3.42719199 3.49065850 3.55412502 3.61759154 3.68105806 3.74452458
[61] 3.80799110 3.87145761 3.93492413 3.99839065 4.06185717 4.12532369
[67] 4.18879020 4.25225672 4.31572324 4.37918976 4.44265628 4.50612280
[73] 4.56958931 4.63305583 4.69652235 4.75998887 4.82345539 4.88692191
[79] 4.95038842 5.01385494 5.07732146 5.14078798 5.20425450 5.26772102
[85] 5.33118753 5.39465405 5.45812057 5.52158709 5.58505361 5.64852012
[91] 5.71198664 5.77545316 5.83891968 5.90238620 5.96585272 6.02931923
[97] 6.09278575 6.15625227 6.21971879 6.28318531
Command:
> x <- cbind(sin(t),cos(t))
> x
Result:
[,1] [,2]
[1,] 0.000000e+00 1.00000000
[2,] 6.342392e-02 0.99798668
[3,] 1.265925e-01 0.99195481
[4,] 1.892512e-01 0.98192870
[5,] 2.511480e-01 0.96794870
[6,] 3.120334e-01 0.95007112
[7,] 3.716625e-01 0.92836793
[8,] 4.297949e-01 0.90292654
[9,] 4.861967e-01 0.87384938
[10,] 5.406408e-01 0.84125353
[11,] 5.929079e-01 0.80527026
[12,] 6.427876e-01 0.76604444
[13,] 6.900790e-01 0.72373404
[14,] 7.345917e-01 0.67850941
[15,] 7.761465e-01 0.63055267
[16,] 8.145760e-01 0.58005691
[17,] 8.497254e-01 0.52722547
[18,] 8.814534e-01 0.47227107
[19,] 9.096320e-01 0.41541501
[20,] 9.341479e-01 0.35688622
[21,] 9.549022e-01 0.29692038
[22,] 9.718116e-01 0.23575894
[23,] 9.848078e-01 0.17364818
[24,] 9.938385e-01 0.11083820
[25,] 9.988673e-01 0.04758192
[26,] 9.998741e-01 -0.01586596
[27,] 9.968548e-01 -0.07924996
[28,] 9.898214e-01 -0.14231484
[29,] 9.788024e-01 -0.20480667
[30,] 9.638422e-01 -0.26647381
[31,] 9.450008e-01 -0.32706796
[32,] 9.223543e-01 -0.38634513
[33,] 8.959938e-01 -0.44406661
[34,] 8.660254e-01 -0.50000000
[35,] 8.325699e-01 -0.55392006
[36,] 7.957618e-01 -0.60560969
[37,] 7.557496e-01 -0.65486073
[38,] 7.126942e-01 -0.70147489
[39,] 6.667690e-01 -0.74526445
[40,] 6.181590e-01 -0.78605309
[41,] 5.670599e-01 -0.82367658
[42,] 5.136774e-01 -0.85798341
[43,] 4.582265e-01 -0.88883545
[44,] 4.009305e-01 -0.91610846
[45,] 3.420201e-01 -0.93969262
[46,] 2.817326e-01 -0.95949297
[47,] 2.203105e-01 -0.97542979
[48,] 1.580014e-01 -0.98743889
[49,] 9.505604e-02 -0.99547192
[50,] 3.172793e-02 -0.99949654
[51,] -3.172793e-02 -0.99949654
[52,] -9.505604e-02 -0.99547192
[53,] -1.580014e-01 -0.98743889
[54,] -2.203105e-01 -0.97542979
[55,] -2.817326e-01 -0.95949297
[56,] -3.420201e-01 -0.93969262
[57,] -4.009305e-01 -0.91610846
[58,] -4.582265e-01 -0.88883545
[59,] -5.136774e-01 -0.85798341
[60,] -5.670599e-01 -0.82367658
[61,] -6.181590e-01 -0.78605309
[62,] -6.667690e-01 -0.74526445
[63,] -7.126942e-01 -0.70147489
[64,] -7.557496e-01 -0.65486073
[65,] -7.957618e-01 -0.60560969
[66,] -8.325699e-01 -0.55392006
[67,] -8.660254e-01 -0.50000000
[68,] -8.959938e-01 -0.44406661
[69,] -9.223543e-01 -0.38634513
[70,] -9.450008e-01 -0.32706796
[71,] -9.638422e-01 -0.26647381
[72,] -9.788024e-01 -0.20480667
[73,] -9.898214e-01 -0.14231484
[74,] -9.968548e-01 -0.07924996
[75,] -9.998741e-01 -0.01586596
[76,] -9.988673e-01 0.04758192
[77,] -9.938385e-01 0.11083820
[78,] -9.848078e-01 0.17364818
[79,] -9.718116e-01 0.23575894
[80,] -9.549022e-01 0.29692038
[81,] -9.341479e-01 0.35688622
[82,] -9.096320e-01 0.41541501
[83,] -8.814534e-01 0.47227107
[84,] -8.497254e-01 0.52722547
[85,] -8.145760e-01 0.58005691
[86,] -7.761465e-01 0.63055267
[87,] -7.345917e-01 0.67850941
[88,] -6.900790e-01 0.72373404
[89,] -6.427876e-01 0.76604444
[90,] -5.929079e-01 0.80527026
[91,] -5.406408e-01 0.84125353
[92,] -4.861967e-01 0.87384938
[93,] -4.297949e-01 0.90292654
[94,] -3.716625e-01 0.92836793
[95,] -3.120334e-01 0.95007112
[96,] -2.511480e-01 0.96794870
[97,] -1.892512e-01 0.98192870
[98,] -1.265925e-01 0.99195481
[99,] -6.342392e-02 0.99798668
[100,] -2.449294e-16 1.00000000
Command:
> library(viridis)
> viridis(length(t))
Result:
[1] "#440154FF" "#450558FF" "#46085CFF" "#470D60FF" "#471063FF" "#481467FF"
[7] "#481769FF" "#481B6DFF" "#481E70FF" "#482173FF" "#482576FF" "#482878FF"
[13] "#472C7AFF" "#472F7CFF" "#46327EFF" "#453581FF" "#453882FF" "#443B84FF"
[19] "#433E85FF" "#424186FF" "#404587FF" "#3F4788FF" "#3E4A89FF" "#3D4D8AFF"
[25] "#3C508BFF" "#3B528BFF" "#39558CFF" "#38598CFF" "#375B8DFF" "#355E8DFF"
[31] "#34608DFF" "#33638DFF" "#32658EFF" "#31688EFF" "#2F6B8EFF" "#2E6D8EFF"
[37] "#2D708EFF" "#2C718EFF" "#2B748EFF" "#2A768EFF" "#29798EFF" "#287C8EFF"
[43] "#277E8EFF" "#26818EFF" "#26828EFF" "#25858EFF" "#24878EFF" "#238A8DFF"
[49] "#228D8DFF" "#218F8DFF" "#20928CFF" "#20938CFF" "#1F968BFF" "#1F998AFF"
[55] "#1E9B8AFF" "#1F9E89FF" "#1FA088FF" "#1FA287FF" "#20A486FF" "#22A785FF"
[61] "#24AA83FF" "#25AC82FF" "#28AE80FF" "#2BB07FFF" "#2EB37CFF" "#31B67BFF"
[67] "#35B779FF" "#39BA76FF" "#3DBC74FF" "#41BE71FF" "#47C06FFF" "#4CC26CFF"
[73] "#51C56AFF" "#56C667FF" "#5BC863FF" "#61CA60FF" "#67CC5CFF" "#6DCD59FF"
[79] "#73D056FF" "#78D152FF" "#7FD34EFF" "#85D54AFF" "#8CD646FF" "#92D741FF"
[85] "#99D83DFF" "#A0DA39FF" "#A7DB35FF" "#ADDC30FF" "#B4DE2CFF" "#BBDE28FF"
[91] "#C2DF23FF" "#C9E020FF" "#D0E11CFF" "#D7E219FF" "#DDE318FF" "#E4E419FF"
[97] "#EBE51AFF" "#F1E51DFF" "#F7E620FF" "#FDE725FF"
> plot(x,col=viridis(length(t)),pch=20)
Result:
R (programming language) Viridis Color Map Example |
Subscribe to:
Posts (Atom)