Package harrypotter. September 3, 2018

Similar documents
Package gameofthrones

Package ggextra. April 4, 2018

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package autocogs. September 22, Title Automatic Cognostic Summaries Version 0.1.1

Package spark. July 21, 2017

Package messaging. May 27, 2018

Package nima. May 23, 2018

Package fastdummies. January 8, 2018

Package ggdark. R topics documented: January 11, Type Package Title Dark Mode for 'ggplot2' Themes Version Author Neal Grantham

Package docxtools. July 6, 2018

Package repec. August 31, 2018

Package Mondrian. R topics documented: March 4, Type Package

Package gggenes. R topics documented: November 7, Title Draw Gene Arrow Maps in 'ggplot2' Version 0.3.2

Package datasets.load

Package bisect. April 16, 2018

Package kdtools. April 26, 2018

Package projector. February 27, 2018

Package colourpicker

Package validara. October 19, 2017

Package farver. November 20, 2018

Package WordR. September 7, 2017

Package vinereg. August 10, 2018

Package palettetown. April 7, 2016

Package gtrendsr. October 19, 2017

Package available. November 17, 2017

Package ggrepel. September 30, 2017

Package qualmap. R topics documented: September 12, Type Package

Package sure. September 19, 2017

Package gtrendsr. August 4, 2018

Package humanize. R topics documented: April 4, Version Title Create Values for Human Consumption

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package queuecomputer

Package sankey. R topics documented: October 22, 2017

Package bigreadr. R topics documented: August 13, Version Date Title Read Large Text Files

Package tidyimpute. March 5, 2018

Package rsppfp. November 20, 2018

Package semver. January 6, 2017

Package pwrab. R topics documented: June 6, Type Package Title Power Analysis for AB Testing Version 0.1.0

Package crochet. January 8, 2018

Package ECctmc. May 1, 2018

Package crossword.r. January 19, 2018

Package panelview. April 24, 2018

Package desplot. R topics documented: April 3, 2018

Package swatches. December 21, 2017

Package lvplot. August 29, 2016

Package kirby21.base

Package dbx. July 5, 2018

Package sessioninfo. June 21, 2017

Package dynsim. R topics documented: August 29, 2016

Package mdftracks. February 6, 2017

Package states. May 4, 2018

Package robotstxt. November 12, 2017

Package canvasxpress

Package spelling. December 18, 2017

Package tiler. June 9, 2018

Package regexselect. R topics documented: September 22, Version Date Title Regular Expressions in 'shiny' Select Lists

Package sfdct. August 29, 2017

Package SFtools. June 28, 2017

Package reval. May 26, 2015

Package geogrid. August 19, 2018

Package knitrprogressbar

Package dotwhisker. R topics documented: June 28, Type Package

Package deductive. June 2, 2017

Package vip. June 15, 2018

Package slickr. March 6, 2018

Package SEMrushR. November 3, 2018

Package areaplot. October 18, 2017

Package IATScore. January 10, 2018

Package splithalf. March 17, 2018

Package balance. October 12, 2018

Package sigmanet. April 23, 2018

Package goodpractice

Package widyr. August 14, 2017

Package wrswor. R topics documented: February 2, Type Package

Package rollply. R topics documented: August 29, Title Moving-Window Add-on for 'plyr' Version 0.5.0

Package jpmesh. December 4, 2017

Package strat. November 23, 2016

Package cli. November 5, 2017

Package ecoseries. R topics documented: September 27, 2017

Package readobj. November 2, 2017

Package autoshiny. June 25, 2018

Package statsdk. September 30, 2017

Package weco. May 4, 2018

Package utilsipea. November 13, 2017

Package lemon. September 12, 2017

Package nngeo. September 29, 2018

Package websearchr. R topics documented: October 23, 2018

Package fastqcr. April 11, 2017

Package memery. February 13, 2018

Package fitur. March 11, 2018

Package processanimater

Package ether. September 22, 2018

Package essurvey. August 23, 2018

Package comparedf. February 11, 2019

Package ecotox. June 28, 2018

Package data.world. April 5, 2018

Package packcircles. April 28, 2018

Package fusionclust. September 19, 2017

Transcription:

Type Package Package harrypotter September 3, 2018 Title Palettes Generated from All ``Harry Potter'' Movies Version 0.1.0 Maintainer Alejandro Jimenez Rico <aljrico@gmail.com> Description Implementation of the characteristic palette present in all Harry Potter movies. Colours obtained by averaging the mean colour from every scene of each movie and from the main colours of each house of Hogwarts. License MIT + file LICENSE Encoding UTF-8 LazyData TRUE Depends R (>= 2.10) Suggests hexbin (>= 1.27.0), testthat, covr URL https://github.com/aljrico/harrypotter BugReports https://github.com/aljrico/harrypotter/issues Imports ggplot2 (>= 1.0.1), gridextra, MASS RoxygenNote 6.0.1 NeedsCompilation no Author Alejandro Jimenez Rico [aut, cre] Repository CRAN Date/Publication 2018-09-03 12:10:02 UTC R topics documented: hp.map........................................... 2 hpmap............................................ 2 scale_color_hp....................................... 4 Index 7 1

2 hpmap hp.map Original Harry Potter colour map Description A dataset containing the averaged RGB values of each frame from every movie of the Harry Potter saga. Usage hp.map Format A data frame containing all the colours used in the palette: V1: Red value V2: Green value V3: Blue value movie: What refers to the movie of the franchise or the house of Hogwarts. It is intended to be a general option for choosing the specific colour palette. hpmap Harry Potter Colour Map. Description This function creates a vector of n equally spaced colors along the HP colour map created by an average calculated for all the colours present in every frame of the pictures. Usage hpmap(n = 256, alpha = 1, begin = 0, end = 1, direction = 1, movie = NA, house = "hufflepuff") hp(n, alpha = 1, begin = 0, end = 1, direction = 1, movie = NA, house = "hufflepuff") hp_pal(alpha = 1, begin = 0, end = 1, direction = 1, movie = NA, house = "hufflepuff")

hpmap 3 Arguments n alpha begin end direction movie house The number of colors ( 1) to be in the palette. The alpha transparency, a number in [0,1], see argument alpha in hsv. The (corrected) hue in [0,1] at which the hp colormap begins. The (corrected) hue in [0,1] at which the hp colormap ends. Sets the order of colors in the scale. If 1, the default, colors are ordered from darkest to lightest. If -1, the order of colors is reversed. A number indicating the colormap movie to use. Eight movies are available: 1,2,3,4,5,6,7 and 8. It is also accepted to desigate the 8th movie as 7.2 and the 7th movie as 7.1. A character string indicating the colourmap from a house to use. Four houses are available: "Gryffindor", "Slytherin", "Ravenclaw" and "Hufflepuff". Details Here are the color scales:

4 scale_color_hp Value Semi-transparent colors (0 < alpha < 1) are supported only on some devices: see rgb. hp returns a character vector, cv, of color hex codes. This can be used either to create a user-defined color palette for subsequent graphics by palette(cv), a col = specification in graphics functions or in par. hpmap returns a n lines data frame containing the red (R), green (G), blue (B) and alpha (alpha) channels of n equally spaced colors along the Harry Potter colour map. n = 256 by default. Author(s) Alejandro Jiménez Rico <aljrico@gmail.com>, Personal Blog Examples library(ggplot2) library(hexbin) dat <- data.frame(x = rnorm(10000), y = rnorm(10000)) ggplot(dat, aes(x = x, y = y)) + geom_hex() + coord_fixed() + scale_fill_gradientn(colours = hp(256, house = "Hufflepuff")) # using code from RColorBrewer to demo the palette n = 200 image( 1:n, 1, as.matrix(1:n), col = hp(n, house = "Slytherin"), xlab = "hp n", ylab = "", xaxt = "n", yaxt = "n", bty = "n" ) scale_color_hp Harry Potter colour scales Description Usage Uses the Harry Potter color scale. scale_color_hp(..., alpha = 1, begin = 0, end = 1, direction = 1, discrete = FALSE, movie = NA, house = "hufflepuff") scale_colour_hp(..., alpha = 1, begin = 0, end = 1, direction = 1, discrete = FALSE, movie = NA, house = "hufflepuff")

scale_color_hp 5 scale_fill_hp(..., alpha = 1, begin = 0, end = 1, direction = 1, discrete = FALSE, movie = NA, house = "hufflepuff") Arguments... parameters to discrete_scale or scale_fill_gradientn alpha begin end Details direction discrete movie house pass through parameter to hp The (corrected) hue in [0,1] at which the hp colormap begins. The (corrected) hue in [0,1] at which the hp colormap ends. Sets the order of colors in the scale. If 1, the default, colors are as output by hp_pal. If -1, the order of colors is reversed. generate a discrete palette? (default: FALSE - generate continuous palette) A number indicating the colormap movie to use. Eight movies are available: 1,2,3,4,5,6,7 and 8. It is also accepted to desigate the 8th movie as 7.2 and the 7th movie as 7.1. A character string indicating the colourmap from a house to use. Four houses are available: "Gryffindor", "Slytherin", "Ravenclaw" and "Hufflepuff". For discrete == FALSE (the default) all other arguments are as to scale_fill_gradientn or scale_color_gradientn. Otherwise the function will return a discrete_scale with the plot-computed number of colors. Author(s) Alejandro Jiménez Rico <aljrico@gmail.com> Examples library(ggplot2) # ripped from the pages of ggplot2 ggplot(mtcars, aes(wt, mpg)) + geom_point(size=4, aes(colour = factor(cyl))) + scale_color_hp(discrete=true, house = "Gryffindor") + theme_bw() # ripped from the pages of ggplot2 dsub <- subset(diamonds, x > 5 & x < 6 & y > 5 & y < 6) dsub$diff <- with(dsub, sqrt(abs(x-y))* sign(x-y)) ggplot(dsub, aes(x, y, colour=diff)) + geom_point() + scale_colour_hp(house = "Ravenclaw") + theme_bw() # from the main hp example dat <- data.frame(x = rnorm(10000), y = rnorm(10000))

6 scale_color_hp ggplot(dat, aes(x = x, y = y)) + geom_hex() + coord_fixed() + scale_fill_hp(house = "Hufflepuff") + theme_bw()

Index Topic datasets hp.map, 2 hp (hpmap), 2 hp.map, 2 hp_pal (hpmap), 2 hpmap, 2 hsv, 3 rgb, 4 scale_color_gradientn, 5 scale_color_hp, 4 scale_colour_hp (scale_color_hp), 4 scale_fill_gradientn, 5 scale_fill_hp (scale_color_hp), 4 7