MaizePal
所属分类:内容生成
开发工具:R
文件大小:6327KB
下载次数:0
上传日期:2020-10-01 16:26:37
上 传 者:
sh-1993
说明: 玉米调色板生成器
(A Maize Color Palette Generator)
文件列表:
.Rbuildignore (34, 2020-10-02)
DESCRIPTION (482, 2020-10-02)
HighMAGIC.jpg (2191850, 2020-10-02)
NAMESPACE (241, 2020-10-02)
R (0, 2020-10-02)
R\colors.R (3188, 2020-10-02)
R\globals.R (80, 2020-10-02)
R\maizepal.R (148, 2020-10-02)
figure (0, 2020-10-02)
figure\Anthocyanins1-1.png (5228, 2020-10-02)
figure\Anthocyanins2-1.png (5301, 2020-10-02)
figure\FloweringTime-1.png (5474, 2020-10-02)
figure\GlassGem-1.png (4926, 2020-10-02)
figure\HighlandMAGIC-1.png (5999, 2020-10-02)
figure\HopiBlue-1.png (4733, 2020-10-02)
figure\Husk-1.png (3806, 2020-10-02)
figure\JimmyRed-1.png (4937, 2020-10-02)
figure\MaizAzul-1.png (4738, 2020-10-02)
figure\MaizMorado-1.png (4837, 2020-10-02)
figure\OaxacaGreen-1.png (5148, 2020-10-02)
figure\Painted-1.png (4420, 2020-10-02)
figure\PodCorn-1.png (4575, 2020-10-02)
figure\RubyGold-1.png (5020, 2020-10-02)
figure\Sweetest-1.png (4567, 2020-10-02)
figure\ggplot1-1.png (13443, 2020-10-02)
maizePal.png (550916, 2020-10-02)
maizepal.Rproj (386, 2020-10-02)
man (0, 2020-10-02)
man\maize_pal.Rd (1176, 2020-10-02)
man\maize_palettes.Rd (366, 2020-10-02)
man\maizepal.Rd (243, 2020-10-02)
nurseryNCSU.JPG (3844223, 2020-10-02)
![](https://github.com/AndiKur4/MaizePal/blob/master/maizePal.png)
### Why MaizePal?
About one year ago, my research took an unexpected turn & I found myself
studying maize. For better or worse, I was here, surrounded by corn & by
people who seemed to be obsessed with it. At first, I didn’t “get it”
because to me, corn was corn was corn. It was yellow and green and
covered vast swaths of the Midwest. Anyone who studies maize landraces,
however, knows that this is not a very generous archetype.
> Landraces are varieties of crops that have been bred by farmers
> through artificial selection outside of the formal breeding sector and
> are often associated with a particular agroecosystem and cultural
> heritage.
The lab I recently joined ([GEMMAlab](https://github.com/AndiKur4/MaizePal/blob/master/https://www.gemmalab.org/))
studies maize landraces to ask fundamental questions about evolution and
adaptation, knowledge that we can then apply to practical applications
in breeding and conservation. In many ways, our lab’s research exists in
sharp contrast to my initial assessment of the crop, and after a season
working in the nursery, I am now convinced that maize is far more
beautiful than my mental archetype gave it credit for. Of the many
varieties growing in our nursery, we harvested cobs with kernels that
were shiny and red as rubies, and others that were pink and purple and
looked like they belonged in a candy shop. Further searching into
international collections online revealed cobs from Oaxaca that were
jade green and blue, cobs from Peru that looked like cream-colored pine
cones with purple speckles, and still others that are pitch black when
harvested and magenta when milled.
The variety of colors and shapes seems endless, and I could wax poetic
about how wrong I was that corn is just yellow and green. Instead, I
wrote an R package inspired by the colors and cobs I’ve seen. This
collection of color palettes is not perfect nor complete, and I will
continue to add to it as I come across more cobs I would like to
document and share. In the meantime, I hope you find this package to be
useful, colorful, and fun.
Installation
------------
I have not yet released the package to CRAN, but intend to do so soon.
For now, please download directly from github using:
``` r
devtools::install_github("AndiKur4/MaizePal")
```
Usage
-----
``` r
library("MaizePal")
# See all palettes
names(maize_palettes)
#> [1] "Anthocyanins1" "Anthocyanins2" "RubyGold" "Sweetest"
#> [5] "GlassGem" "PodCorn" "HighlandMAGIC" "MaizAzul"
#> [9] "JimmyRed" "FloweringTime" "HopiBlue" "Painted"
#> [13] "MaizMorado" "OaxacaGreen"
```
Palettes
========
### Sweetest
``` r
maize_pal("Sweetest")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/Sweetest-1.png)
### Anthocyanins1
``` r
maize_pal("Anthocyanins1")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/Anthocyanins1-1.png)
### Anthocyanins2
``` r
maize_pal("Anthocyanins2")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/Anthocyanins2-1.png)
### RubyGold
``` r
maize_pal("RubyGold")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/RubyGold-1.png)
### JimmyRed
``` r
maize_pal("JimmyRed")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/JimmyRed-1.png)
### MaizAzul
``` r
maize_pal("MaizAzul")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/MaizAzul-1.png)
### HopiBlue
``` r
maize_pal("HopiBlue")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/HopiBlue-1.png)
### GlassGem
``` r
maize_pal("GlassGem")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/GlassGem-1.png)
``` r
library("ggplot2")
ggplot(mtcars, aes(factor(cyl), fill=factor(gear))) + geom_bar() +
scale_fill_manual(values = maize_pal("GlassGem"))
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/ggplot1-1.png)
### Painted
``` r
maize_pal("Painted")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/Painted-1.png)
### MaizMorado
``` r
maize_pal("MaizMorado")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/MaizMorado-1.png)
### OaxacaGreen
``` r
maize_pal("OaxacaGreen")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/OaxacaGreen-1.png)
### FloweringTime
``` r
maize_pal("FloweringTime")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/FloweringTime-1.png)
### PodCorn
``` r
maize_pal("PodCorn")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/PodCorn-1.png)
### HighlandMAGIC
``` r
maize_pal("HighlandMAGIC")
```
![](https://github.com/AndiKur4/MaizePal/blob/master/figure/HighlandMAGIC-1.png)
![](https://github.com/AndiKur4/MaizePal/blob/master/HighMAGIC.jpg)
> The above picture is of a mapping population that our lab is currently
> working with, as a part of the [Genetics of Highland Adaptation in
> Maize](https://github.com/AndiKur4/MaizePal/blob/master/http://highlandadaptation.org/) project. The parent landraces
> of this population are from highlands fields in Central and South
> America (Sabanero, Bolita, Connor, Pising, Azul, Mishca, Cpunti, and
> Palomero)
![](https://github.com/AndiKur4/MaizePal/blob/master/nurseryNCSU.JPG)
> Our summer nursery at the Central Crops Research Station in NC
Acknowledgements
----------------
Thank you to Karthik Ram of [Wes Anderson
Palettes](https://github.com/AndiKur4/MaizePal/blob/master/https://github.com/karthik/wesanderson) for permission to
borrow & scrapbook their code into MaizePal. Additional thanks to my old
lab-mate Eddie Marques for initially suggesting this idea and to my new
PI & lab-mates, Ruben, Fausto, and Allison, for enduring my endless
requests for opinions on colors.
近期下载者:
相关文件:
收藏者: