Title: | SVG Glyphs for Ggplot |
---|---|
Description: | Use SVG graphics as glyphs when plotting points with ggplot2. |
Authors: | Mike Cheng [aut, cre, cph] |
Maintainer: | Mike Cheng <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.13 |
Built: | 2024-11-10 02:59:15 UTC |
Source: | https://github.com/coolbutuseless/ggsvg |
If two grobs in a plot have the same name, then it is not guaranteed that both will be drawn. This function ensures that every grob in a tree has a unique name.
add_suffix(x, suffix)
add_suffix(x, suffix)
x |
grobTree |
suffix |
string |
new grobTree
These Geoms are created dynamically as each time geom_point_svg()
is called, it wants to customize the $default_aes
on this
ggproto. Because ggproto objects are environments, then setting a default
on the global copy would set the default for all references. This will
get messy as things like CSS Aesthetics should not be shared between
plots.
create_new_GeomPointSVG()
create_new_GeomPointSVG()
So every geom_point_svg() gets a fresh GeomPointSVG by calling this function.
ggproto object for GeomPointSVG
This function should only be used with an aes()
call in geom_point_svg()
,
or as an argument to a ggsvg
scale object e.g.
scale_svg_fill_discrete(aesthetics = css(...))
css(selector, ..., format = NULL)
css(selector, ..., format = NULL)
selector |
CSS selector as a single character string e.g. "circle .big" |
... |
single named argument of the form |
format |
Advanced. This is a string specifying the formatting for the CSS property value.
This is almost (but not quite) the equivalent of a formatting string
for the Default: NULL is equivalent to "[x]" and will insert just the bare value. For example, if the CSS property required an explicit "px" suffix on the value, the format would be "[x]px" |
a named amed list (with length = 1) where the name is the full name of this CSS aesthetic, and the value is the unevaluated value passed in to the ...
## Not run: # circle .bit { stroke = XX; } css("circle .big", stroke = as.factor(cyl)) # circle .bit { stroke = XXpx; } css("circle .big", stroke = as.factor(cyl), format = "[x]px") ## End(Not run)
## Not run: # circle .bit { stroke = XX; } css("circle .big", stroke = as.factor(cyl)) # circle .bit { stroke = XXpx; } css("circle .big", stroke = as.factor(cyl), format = "[x]px") ## End(Not run)
Key for SVG points
draw_key_PointSVG(data, params, size)
draw_key_PointSVG(data, params, size)
data , params , size
|
key stuff |
Aesthetics
SVG as a character string
Specify rendered width and/or height. If only one of these values
is specified, then the other will be scaled to keep he aspect ratio.
If neither value is specified (the default) then dimensions will be taken from the
SVG itself. This value could be used to increase the resolution of the SVG so it
does not appear blurry once rendered to an element in the plot e.g. svg_width = 1000
The justification of the SVG's bounding rectangle relative to its (x,y) position. Default value of 0.5 mean to centre the SVG at the specified location. Standard values for these variables are in the range [0,1]
Absolute positioning within the panel. Default: NULL means that the standard x,y positioning is to be used. Standard values for these variables are in the range [0,1]
geom_point_svg( mapping = NULL, ..., data = NULL, stat = "identity", position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, defaults = list() )
geom_point_svg( mapping = NULL, ..., data = NULL, stat = "identity", position = "identity", na.rm = FALSE, show.legend = NA, inherit.aes = TRUE, defaults = list() )
mapping , data , stat , position , ... , na.rm , show.legend , inherit.aes
|
see
documentation for |
defaults |
Advanced option. A named list of default values for new aesthetics.
In general this is not necessary when using Set 'options(GGSVG_DEBUG = TRUE)' for some verbose debugging which will cause ggsvg to output (to the console) the final SVG for each and every element in the plot. |
ggplot2 layer object
S3 method
## S3 method for class 'ScaleSVGDefault' ggplot_add(object, plot, object_name)
## S3 method for class 'ScaleSVGDefault' ggplot_add(object, plot, object_name)
object , plot , object_name
|
see ggplot2 docs |
Automatically add a default scale for SVG CSS aesthetics
scale_ggsvg_default(p, verbose = FALSE)
scale_ggsvg_default(p, verbose = FALSE)
p |
|
verbose |
Be verbose about what scales are being created? Logical. Default: FALSE |
ggplot2
object with default scale_svg_*()
added to
the plot environment so that ggplot2
will find these
scales.
If a scale for a particular aesthetic is not explicitly given, then
ggplot2
guesses which scales to use based upon two things:
The aesthetic being mapped e.g. fill
The type of data that is being mapped e.g. continuous
, discrete
,
date
etc
For regular ggplot2
plots, the combination of all these factors have
scales included in the ggplot2
package e.g. scale_fill_continous
,
scale_linetype_discrete
.
However, for ggsvg
, using css()
aesthetics means that there
are a very large number of aesthetics being mapped to i.e not just fill
and colour
, but also stroke-width
, angle
and many other
CSS parameters.
Furthermore, CSS selectors are used to target the aesthetic, and since
there are an infinite number of valid CSS selectors, there will be an
infinite number of scales needed to be provided by ggsvg
.
Fortunately, the majority of things we want to map to in SVG are either
colours or numbers, which means that we can create a single colour
scale
for use with ggsvg
and just change its name, then add it to the plot
environment so that ggplot2
can find it when it renders the plot.
See the corresponding scale_*()
function in ggplot2
for
more information on how scales operate.
scale_svg_alpha(aesthetics, ..., range = c(0.1, 1)) scale_svg_alpha_binned(aesthetics, ..., range = c(0.1, 1)) scale_svg_alpha_continuous(aesthetics, ..., range = c(0.1, 1)) scale_svg_alpha_discrete(aesthetics, ...) scale_svg_alpha_identity(aesthetics, ..., guide = "none") scale_svg_alpha_manual( aesthetics, ..., values, breaks = waiver(), na.value = NA ) scale_svg_alpha_ordinal(aesthetics, ..., range = c(0.1, 1)) scale_svg_colour_binned( aesthetics, ..., type = getOption("ggplot2.binned.colour") ) scale_svg_colour_brewer( aesthetics, ..., type = "seq", palette = 1, direction = 1 ) scale_svg_colour_continuous( aesthetics, ..., type = getOption("ggplot2.continuous.colour") ) scale_svg_colour_discrete( aesthetics, ..., type = getOption("ggplot2.discrete.colour") ) scale_svg_colour_fermenter( aesthetics, ..., type = "seq", palette = 1, direction = -1, na.value = "grey50", guide = "coloursteps" ) scale_svg_colour_grey( aesthetics, ..., start = 0.2, end = 0.8, na.value = "red" ) scale_svg_colour_hue( aesthetics, ..., h = c(0, 360) + 15, c = 100, l = 65, h.start = 0, direction = 1, na.value = "grey50" ) scale_svg_colour_identity(aesthetics, ..., guide = "none") scale_svg_colour_manual( aesthetics, ..., values, breaks = waiver(), na.value = "grey50" ) scale_svg_colour_ordinal( aesthetics, ..., type = getOption("ggplot2.ordinal.colour", getOption("ggplot2.ordinal.fill")) ) scale_svg_colour_qualitative( aesthetics, ..., type = NULL, h = c(0, 360) + 15, c = 100, l = 65, h.start = 0, direction = 1, na.value = "grey50" ) scale_svg_colour_steps( aesthetics, ..., low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "grey50", guide = "coloursteps" ) scale_svg_colour_steps2( aesthetics, ..., low = muted("red"), mid = "white", high = muted("blue"), midpoint = 0, space = "Lab", na.value = "grey50", guide = "coloursteps" ) scale_svg_colour_stepsn( aesthetics, ..., colours, values = NULL, space = "Lab", na.value = "grey50", guide = "coloursteps", colors ) scale_svg_colour_viridis_b( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D", values = NULL, space = "Lab", na.value = "grey50", guide = "coloursteps" ) scale_svg_colour_viridis_d( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D" ) scale_svg_continuous_identity(aesthetics, ..., guide = "none") scale_svg_discrete_identity(aesthetics, ..., guide = "none") scale_svg_discrete_manual(aesthetics, ..., values, breaks = waiver()) scale_svg_fill_binned(aesthetics, ..., type = getOption("ggplot2.binned.fill")) scale_svg_fill_brewer( aesthetics, ..., type = "seq", palette = 1, direction = 1 ) scale_svg_fill_continuous( aesthetics, ..., type = getOption("ggplot2.continuous.fill") ) scale_svg_fill_discrete( aesthetics, ..., type = getOption("ggplot2.discrete.fill") ) scale_svg_fill_fermenter( aesthetics, ..., type = "seq", palette = 1, direction = -1, na.value = "grey50", guide = "coloursteps" ) scale_svg_fill_grey(aesthetics, ..., start = 0.2, end = 0.8, na.value = "red") scale_svg_fill_hue( aesthetics, ..., h = c(0, 360) + 15, c = 100, l = 65, h.start = 0, direction = 1, na.value = "grey50" ) scale_svg_fill_identity(aesthetics, ..., guide = "none") scale_svg_fill_manual( aesthetics, ..., values, breaks = waiver(), na.value = "grey50" ) scale_svg_fill_ordinal( aesthetics, ..., type = getOption("ggplot2.ordinal.fill", getOption("ggplot2.ordinal.colour")) ) scale_svg_fill_qualitative( aesthetics, ..., type = NULL, h = c(0, 360) + 15, c = 100, l = 65, h.start = 0, direction = 1, na.value = "grey50" ) scale_svg_fill_steps( aesthetics, ..., low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "grey50", guide = "coloursteps" ) scale_svg_fill_steps2( aesthetics, ..., low = muted("red"), mid = "white", high = muted("blue"), midpoint = 0, space = "Lab", na.value = "grey50", guide = "coloursteps" ) scale_svg_fill_stepsn( aesthetics, ..., colours, values = NULL, space = "Lab", na.value = "grey50", guide = "coloursteps", colors ) scale_svg_fill_viridis_b( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D", values = NULL, space = "Lab", na.value = "grey50", guide = "coloursteps" ) scale_svg_fill_viridis_d( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D" ) scale_svg_linetype(aesthetics, ..., na.value = "blank") scale_svg_linetype_binned(aesthetics, ..., na.value = "blank") scale_svg_linetype_continuous(aesthetics, ...) scale_svg_linetype_discrete(aesthetics, ..., na.value = "blank") scale_svg_linetype_identity(aesthetics, ..., guide = "none") scale_svg_linetype_manual( aesthetics, ..., values, breaks = waiver(), na.value = "blank" ) scale_svg_radius( aesthetics, name = waiver(), breaks = waiver(), labels = waiver(), limits = NULL, range = c(1, 6), trans = "identity", guide = "legend" ) scale_svg_size( aesthetics, name = waiver(), breaks = waiver(), labels = waiver(), limits = NULL, range = c(5, 10), trans = "identity", guide = "legend" ) scale_svg_size_area(aesthetics, ..., max_size = 6) scale_svg_size_binned( aesthetics, name = waiver(), breaks = waiver(), labels = waiver(), limits = NULL, range = c(5, 10), n.breaks = NULL, nice.breaks = TRUE, trans = "identity", guide = "bins" ) scale_svg_size_binned_area(aesthetics, ..., max_size = 6) scale_svg_size_continuous( aesthetics, name = waiver(), breaks = waiver(), labels = waiver(), limits = NULL, range = c(5, 10), trans = "identity", guide = "legend" ) scale_svg_size_discrete(aesthetics, ...) scale_svg_size_identity(aesthetics, ..., guide = "none") scale_svg_size_manual( aesthetics, ..., values, breaks = waiver(), na.value = NA ) scale_svg_size_ordinal(aesthetics, ..., range = c(5, 10))
scale_svg_alpha(aesthetics, ..., range = c(0.1, 1)) scale_svg_alpha_binned(aesthetics, ..., range = c(0.1, 1)) scale_svg_alpha_continuous(aesthetics, ..., range = c(0.1, 1)) scale_svg_alpha_discrete(aesthetics, ...) scale_svg_alpha_identity(aesthetics, ..., guide = "none") scale_svg_alpha_manual( aesthetics, ..., values, breaks = waiver(), na.value = NA ) scale_svg_alpha_ordinal(aesthetics, ..., range = c(0.1, 1)) scale_svg_colour_binned( aesthetics, ..., type = getOption("ggplot2.binned.colour") ) scale_svg_colour_brewer( aesthetics, ..., type = "seq", palette = 1, direction = 1 ) scale_svg_colour_continuous( aesthetics, ..., type = getOption("ggplot2.continuous.colour") ) scale_svg_colour_discrete( aesthetics, ..., type = getOption("ggplot2.discrete.colour") ) scale_svg_colour_fermenter( aesthetics, ..., type = "seq", palette = 1, direction = -1, na.value = "grey50", guide = "coloursteps" ) scale_svg_colour_grey( aesthetics, ..., start = 0.2, end = 0.8, na.value = "red" ) scale_svg_colour_hue( aesthetics, ..., h = c(0, 360) + 15, c = 100, l = 65, h.start = 0, direction = 1, na.value = "grey50" ) scale_svg_colour_identity(aesthetics, ..., guide = "none") scale_svg_colour_manual( aesthetics, ..., values, breaks = waiver(), na.value = "grey50" ) scale_svg_colour_ordinal( aesthetics, ..., type = getOption("ggplot2.ordinal.colour", getOption("ggplot2.ordinal.fill")) ) scale_svg_colour_qualitative( aesthetics, ..., type = NULL, h = c(0, 360) + 15, c = 100, l = 65, h.start = 0, direction = 1, na.value = "grey50" ) scale_svg_colour_steps( aesthetics, ..., low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "grey50", guide = "coloursteps" ) scale_svg_colour_steps2( aesthetics, ..., low = muted("red"), mid = "white", high = muted("blue"), midpoint = 0, space = "Lab", na.value = "grey50", guide = "coloursteps" ) scale_svg_colour_stepsn( aesthetics, ..., colours, values = NULL, space = "Lab", na.value = "grey50", guide = "coloursteps", colors ) scale_svg_colour_viridis_b( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D", values = NULL, space = "Lab", na.value = "grey50", guide = "coloursteps" ) scale_svg_colour_viridis_d( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D" ) scale_svg_continuous_identity(aesthetics, ..., guide = "none") scale_svg_discrete_identity(aesthetics, ..., guide = "none") scale_svg_discrete_manual(aesthetics, ..., values, breaks = waiver()) scale_svg_fill_binned(aesthetics, ..., type = getOption("ggplot2.binned.fill")) scale_svg_fill_brewer( aesthetics, ..., type = "seq", palette = 1, direction = 1 ) scale_svg_fill_continuous( aesthetics, ..., type = getOption("ggplot2.continuous.fill") ) scale_svg_fill_discrete( aesthetics, ..., type = getOption("ggplot2.discrete.fill") ) scale_svg_fill_fermenter( aesthetics, ..., type = "seq", palette = 1, direction = -1, na.value = "grey50", guide = "coloursteps" ) scale_svg_fill_grey(aesthetics, ..., start = 0.2, end = 0.8, na.value = "red") scale_svg_fill_hue( aesthetics, ..., h = c(0, 360) + 15, c = 100, l = 65, h.start = 0, direction = 1, na.value = "grey50" ) scale_svg_fill_identity(aesthetics, ..., guide = "none") scale_svg_fill_manual( aesthetics, ..., values, breaks = waiver(), na.value = "grey50" ) scale_svg_fill_ordinal( aesthetics, ..., type = getOption("ggplot2.ordinal.fill", getOption("ggplot2.ordinal.colour")) ) scale_svg_fill_qualitative( aesthetics, ..., type = NULL, h = c(0, 360) + 15, c = 100, l = 65, h.start = 0, direction = 1, na.value = "grey50" ) scale_svg_fill_steps( aesthetics, ..., low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "grey50", guide = "coloursteps" ) scale_svg_fill_steps2( aesthetics, ..., low = muted("red"), mid = "white", high = muted("blue"), midpoint = 0, space = "Lab", na.value = "grey50", guide = "coloursteps" ) scale_svg_fill_stepsn( aesthetics, ..., colours, values = NULL, space = "Lab", na.value = "grey50", guide = "coloursteps", colors ) scale_svg_fill_viridis_b( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D", values = NULL, space = "Lab", na.value = "grey50", guide = "coloursteps" ) scale_svg_fill_viridis_d( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D" ) scale_svg_linetype(aesthetics, ..., na.value = "blank") scale_svg_linetype_binned(aesthetics, ..., na.value = "blank") scale_svg_linetype_continuous(aesthetics, ...) scale_svg_linetype_discrete(aesthetics, ..., na.value = "blank") scale_svg_linetype_identity(aesthetics, ..., guide = "none") scale_svg_linetype_manual( aesthetics, ..., values, breaks = waiver(), na.value = "blank" ) scale_svg_radius( aesthetics, name = waiver(), breaks = waiver(), labels = waiver(), limits = NULL, range = c(1, 6), trans = "identity", guide = "legend" ) scale_svg_size( aesthetics, name = waiver(), breaks = waiver(), labels = waiver(), limits = NULL, range = c(5, 10), trans = "identity", guide = "legend" ) scale_svg_size_area(aesthetics, ..., max_size = 6) scale_svg_size_binned( aesthetics, name = waiver(), breaks = waiver(), labels = waiver(), limits = NULL, range = c(5, 10), n.breaks = NULL, nice.breaks = TRUE, trans = "identity", guide = "bins" ) scale_svg_size_binned_area(aesthetics, ..., max_size = 6) scale_svg_size_continuous( aesthetics, name = waiver(), breaks = waiver(), labels = waiver(), limits = NULL, range = c(5, 10), trans = "identity", guide = "legend" ) scale_svg_size_discrete(aesthetics, ...) scale_svg_size_identity(aesthetics, ..., guide = "none") scale_svg_size_manual( aesthetics, ..., values, breaks = waiver(), na.value = NA ) scale_svg_size_ordinal(aesthetics, ..., range = c(5, 10))
aesthetics |
names of aesthethics to apply this scale to. e.g.
|
... , range , guide , values , breaks , na.value , type , palette
|
See |
direction , start , end , h , c , l , h.start , low , high , space
|
See |
mid , midpoint , colours , colors , alpha , begin , option , name
|
See |
labels , limits , trans , max_size , n.breaks , nice.breaks
|
See |
ggsvg
All these colour/fill scales use guide_colourbar()
but by default,
this guide will only accept aesthetics of fill
and colour
.
All these colour/fill scales use guide_colourbar()
but by default,
this guide will only accept aesthetics of fill
and colour
.
scale_svg_colour_gradient( aesthetics, ..., low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_distiller( aesthetics, ..., type = "seq", palette = 1, direction = -1, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_gradient2( aesthetics, ..., low = muted("red"), mid = "white", high = muted("blue"), midpoint = 0, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_gradientn( aesthetics, ..., colours, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics), colors ) scale_svg_colour_viridis_c( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D", values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_distiller( aesthetics, ..., type = "seq", palette = 1, direction = -1, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_gradient( aesthetics, ..., low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_gradient2( aesthetics, ..., low = muted("red"), mid = "white", high = muted("blue"), midpoint = 0, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_gradientn( aesthetics, ..., colours, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics), colors ) scale_svg_fill_viridis_c( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D", values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_gradient( aesthetics, ..., low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_distiller( aesthetics, ..., type = "seq", palette = 1, direction = -1, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_gradient2( aesthetics, ..., low = muted("red"), mid = "white", high = muted("blue"), midpoint = 0, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_gradientn( aesthetics, ..., colours, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics), colors ) scale_svg_colour_viridis_c( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D", values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_distiller( aesthetics, ..., type = "seq", palette = 1, direction = -1, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_gradient( aesthetics, ..., low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_gradient2( aesthetics, ..., low = muted("red"), mid = "white", high = muted("blue"), midpoint = 0, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_gradientn( aesthetics, ..., colours, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics), colors ) scale_svg_fill_viridis_c( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D", values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) )
scale_svg_colour_gradient( aesthetics, ..., low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_distiller( aesthetics, ..., type = "seq", palette = 1, direction = -1, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_gradient2( aesthetics, ..., low = muted("red"), mid = "white", high = muted("blue"), midpoint = 0, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_gradientn( aesthetics, ..., colours, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics), colors ) scale_svg_colour_viridis_c( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D", values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_distiller( aesthetics, ..., type = "seq", palette = 1, direction = -1, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_gradient( aesthetics, ..., low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_gradient2( aesthetics, ..., low = muted("red"), mid = "white", high = muted("blue"), midpoint = 0, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_gradientn( aesthetics, ..., colours, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics), colors ) scale_svg_fill_viridis_c( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D", values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_gradient( aesthetics, ..., low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_distiller( aesthetics, ..., type = "seq", palette = 1, direction = -1, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_gradient2( aesthetics, ..., low = muted("red"), mid = "white", high = muted("blue"), midpoint = 0, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_colour_gradientn( aesthetics, ..., colours, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics), colors ) scale_svg_colour_viridis_c( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D", values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_distiller( aesthetics, ..., type = "seq", palette = 1, direction = -1, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_gradient( aesthetics, ..., low = "#132B43", high = "#56B1F7", space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_gradient2( aesthetics, ..., low = muted("red"), mid = "white", high = muted("blue"), midpoint = 0, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) ) scale_svg_fill_gradientn( aesthetics, ..., colours, values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics), colors ) scale_svg_fill_viridis_c( aesthetics, ..., alpha = 1, begin = 0, end = 1, direction = 1, option = "D", values = NULL, space = "Lab", na.value = "grey50", guide = ggplot2::guide_colorbar(available_aes = aesthetics) )
aesthetics |
name of the aesthetic e.g. |
... , guide , low , high , space , na.value , type , palette , direction , values , mid , midpoint , colours , colors , alpha , begin , end , option
|
see |
The two key changes to these scales compared to their ggplot2
originals are:
Default guide
argument is now a guide_colourbar()
object
which explicitly supports the current aesthetics
aesthetics
is now a required argument
The two key changes to these scales compared to their ggplot2
originals are:
Default guide
argument is now a guide_colourbar()
object
which explicitly supports the current aesthetics
aesthetics
is now a required argument
grid
rasterGrob
objectConvert SVG to a grid
rasterGrob
object
svg_to_rasterGrob(svg_text, width = NULL, height = NULL, css = NULL, ...)
svg_to_rasterGrob(svg_text, width = NULL, height = NULL, css = NULL, ...)
svg_text |
character string containing valid SVG |
width , height
|
output width,height in pixels or |
css |
character string containing CSS text. This requires your system has a recent version of librsvg. |
... |
other arguments passed to 'grid::rasterGrob()'. |
grid::rasterGrob()
object containing the
nativeRaster
returned from rsvg