Questions tagged [viridis]
An R package implementing several popular color maps, such as the 'viridis' (the default) 'magma', 'plasma', 'inferno', and 'cividis' in R. These color maps are designed to be perfectly perceptually-uniform, both in regular form and also when converted to black-and-white. They are also designed to be perceived by readers with the most common form of color blindness (all color maps in this package) and color vision deficiency ('cividis' only).
viridis
66
questions
0
votes
1
answer
43
views
use two different viridis colour palettes in a single plot [duplicate]
I would like to use two different viridis colour palettes with scale_color_viridis_c to show differences between the two different groups (a and b). Is there a way to change my code below in a way ...
1
vote
1
answer
96
views
Plotting geom_smooth with log10 transformation
This is my first post so I am sorry if I did something wrong (hope not!).
I am struggling with aesthetics of my GAM plots, tried different options, searched for solutions but did not succeeded.
I am ...
2
votes
0
answers
40
views
Manually set maximum value in scale_fill_viridis() when plotting rasters
I have some rasters of species ranges and I want to plot them in R. They overlap in some areas and I want the legend to show the number of overlapping species. However, I want the colour scale (and ...
2
votes
1
answer
70
views
How to get full range of scale_fill_viridis for sankey plot when using factor
I am trying to create a sankey plot, but also specify in what orders the left nodes will be reported from top to bottom. To specify the order I must change the column by listing it as factor. However, ...
0
votes
0
answers
165
views
Create a ggplot graph with inferno instead of viridis color palette
I have the dataset below
data<-structure(list(new_cat = c("animals", "art", "books", "business",
"celebrity", "colleges", "fashion&...
0
votes
0
answers
122
views
How to skew a color scale?
I am mapping annual precipitation in the USA, but the high values (blue) are so extreme that the rest of the map is not very informative.
I'm currently using scale_fill_viridis_c(direction = -1, na....
2
votes
1
answer
73
views
Why do viridis and hcl.color yield different colors?
I expected the calls below to viridis and hcl.color to output the same three colors:
> viridis::viridis(9) %>% sub("FF$", "", .)
[1] "#440154" "#472D7B" &...
2
votes
1
answer
1k
views
Identifying colour codes for Viridis Palette - mako option G
On many of my images thus far, I have been using the viridis colour palette - Option G (or Mako).
I've been using functions to select from the palette, such as scale_fill_viridis_d(option = "G&...
0
votes
0
answers
48
views
In R Shiny, How do I update a leaflet map colors with a reactive variable?
I am trying to build an app in R Shiny which takes inputs from several different data sets and then maps them. My main problem is trying to get the colors to change based off of what data is selected. ...
1
vote
0
answers
19
views
ShinyApp - use reactive dataframes to speed up
I am building a Shiny App. I am plotting a graph with ggvis, following the nice Movies example. My issue is that I am also allowing the user to select the variable to be used to `fill' in the graph, ...
1
vote
2
answers
394
views
Restrict viridis colour scale to between two values
I'd like to change the scale so that everything below 10 is black, then the colour scale is between e.g. 10 and 50, and then everything above 50 is the lightest yellow in the scale. In other words, I'...
1
vote
0
answers
48
views
PNG conversion with viridis color chart error
I created a script where I have a working directory with several png images with a greyscale map in it. I want to convert the greyscale color chart to a viridis color chart to show to occurrences of ...
1
vote
1
answer
208
views
How can I specify the color ramp using Scale_color_viridis_c in R?
The information for scale_color_viridis_c states:
scale_colour_viridis_c(
...,
alpha = 1,
begin = 0,
end = 1,
direction = 1,
option = "D",
values = NULL,
space = "Lab&...
0
votes
0
answers
110
views
violin plots with viridis, removing NAs
Previous Post:
I am trying to remove NAs from a set of violin plots, and the error keeps changing. With the following code, I get the message that "! Aesthetics must be either length 1 or the ...
0
votes
1
answer
172
views
Is there a way to add the viridis color palette to a spplot having these requirements?
I need to make a spplot for a college project. The teacher has given us instructions on how to create the spplot that shows the map. However, he gives the code with default colors and I need that the ...