Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 2.66 KB

README.md

File metadata and controls

62 lines (45 loc) · 2.66 KB

jwstpalettes

jwstpalettes is an r package of colour palettes inspired by images from nasa's james webb space telescope. v0.1.0, more palettes and features will be added soon.

installation

install using devtools

devtools::install_github("perikarya/jwstpalettes")

usage

jwstpalette(name, n, type): where name is the name of the palette, n is the number of colours, and type can be "discrete" or "continuous"

examples

library(jwstpalettes)
plot(dist ~ speed, data = cars, pch = 19, col = jwst_palette("carina", 3))

image

hist(cars$speed, breaks = 25, main = "", xlab = "Speed", col = jwst_palette("tarantula2", 25, type = "continuous"))

image

levelplot(volcano, col.regions = jwst_palette("dimorphos", 100, type = "continuous"))

image

ggplot(data = diamonds, aes(x = cut, group = clarity, fill = clarity)) +
geom_density(adjust = 3, position = "stack", alpha = 0.8, color = NA) +
scale_fill_discrete(type = jwst_palette("neptune")) + 
theme(panel.grid.minor = element_blank())

image

current palettes

neptune
image

dimorphos
image

carina
image

dustring
image

tarantula1
image

tarantula2
image

tarantula3
image