forked from davidgohel/ggiraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscale_colour_brewer_interactive.Rd
98 lines (82 loc) · 4.13 KB
/
scale_colour_brewer_interactive.Rd
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale_brewer_interactive.R
\name{scale_colour_brewer_interactive}
\alias{scale_colour_brewer_interactive}
\alias{scale_color_brewer_interactive}
\alias{scale_fill_brewer_interactive}
\alias{scale_colour_distiller_interactive}
\alias{scale_color_distiller_interactive}
\alias{scale_fill_distiller_interactive}
\alias{scale_colour_fermenter_interactive}
\alias{scale_color_fermenter_interactive}
\alias{scale_fill_fermenter_interactive}
\title{Create interactive colorbrewer scales}
\usage{
scale_colour_brewer_interactive(...)
scale_color_brewer_interactive(...)
scale_fill_brewer_interactive(...)
scale_colour_distiller_interactive(...)
scale_color_distiller_interactive(...)
scale_fill_distiller_interactive(...)
scale_colour_fermenter_interactive(...)
scale_color_fermenter_interactive(...)
scale_fill_fermenter_interactive(...)
}
\arguments{
\item{...}{arguments passed to base function,
plus any of the \link{interactive_parameters}.}
}
\value{
An interactive scale object.
}
\description{
These scales are based on
\code{\link[=scale_colour_brewer]{scale_colour_brewer()}},
\code{\link[=scale_fill_brewer]{scale_fill_brewer()}},
\code{\link[=scale_colour_distiller]{scale_colour_distiller()}},
\code{\link[=scale_fill_distiller]{scale_fill_distiller()}},
\code{\link[=scale_colour_fermenter]{scale_colour_fermenter()}},
\code{\link[=scale_fill_fermenter]{scale_fill_fermenter()}}.
See the documentation for those functions for more details.
}
\section{Details for interactive scale and interactive guide functions}{
For scales, the interactive parameters can be supplied as arguments in the relevant function
and they can be scalar values or vectors, depending on the number of breaks (levels) and
the type of the guide used.
The guides do not accept any interactive parameter directly, they receive them from the scales.
When guide of type \code{legend}, \code{bins}, \code{colourbar} or \code{coloursteps} is used,
it will be converted to a \code{\link[=guide_legend_interactive]{guide_legend_interactive()}}, \code{\link[=guide_bins_interactive]{guide_bins_interactive()}},
\code{\link[=guide_colourbar_interactive]{guide_colourbar_interactive()}} or \code{\link[=guide_coloursteps_interactive]{guide_coloursteps_interactive()}} respectively,
if it's not already.
The length of each scale interactive parameter vector should match the length of the breaks.
It can also be a named vector, where each name should correspond to the same break name.
It can also be defined as function that takes the breaks as input and returns a named or
unnamed vector of values as output.
For binned guides like \code{bins} and \code{coloursteps} the breaks include the label breaks and the limits.
The number of bins will be one less than the number of breaks and the interactive parameters can be
constructed for each bin separately (look at the examples).
For \code{colourbar} guide in raster mode, the breaks vector, is scalar 1 always, meaning the interactive
parameters should be scalar too. For \code{colourbar} guide in non-raster mode, the bar is drawn using
rectangles, and the breaks are the midpoints of each rectangle.
The interactive parameters here, give interactivity only to the key elements of the guide.
To provide interactivity to the rest of the elements of a guide, (title, labels, background, etc),
the relevant theme elements or relevant guide arguments can be used.
The \code{guide} arguments \code{title.theme} and \code{label.theme} can be defined as
\code{element_text_interactive} (in fact, they will be converted to that if they are not
already), either directly or via the theme.
See the element_*_interactive section for more details.
}
\seealso{
\code{\link[=girafe]{girafe()}}
Other interactive scale:
\code{\link{scale_alpha_interactive}()},
\code{\link{scale_colour_interactive}},
\code{\link{scale_colour_steps_interactive}()},
\code{\link{scale_gradient_interactive}},
\code{\link{scale_linetype_interactive}()},
\code{\link{scale_manual_interactive}},
\code{\link{scale_shape_interactive}()},
\code{\link{scale_size_interactive}()},
\code{\link{scale_viridis_interactive}}
}
\concept{interactive scale}