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).

61 questions
2
votes
1 answer

Is there a way to fit this density plot into the frame better?

Dput Here is the dput for my data: work <- structure(list(Mins_Work = c(435L, 350L, 145L, 135L, 15L, 60L, 60L, 390L, 395L, 395L, 315L, 80L, 580L, 175L, 545L, 230L, 435L, …
Shawn Hemelstrand
  • 2,676
  • 4
  • 17
  • 30
2
votes
1 answer

Is there any way to add a color palette into the size aesthetic?

I am working in the next code: ggplot()+ geom_sf(data = DPEst_DH, aes(size = di1a), col="orangered") that works. But I want a colored legend. In other words, I want apply the same field at two aesthetics, size and color but keeping one legend. ...+…
3_catsmx
  • 35
  • 5
2
votes
3 answers

How can I delete the background in stat_density_2d?

I am trying to make density maps in R using the function stat_density_2d, but I would like to remove the background color for which the density is null. I tried changing the limits for the density, but when moving the limits from [0,5] to [0.1, 5],…
Khadija
  • 23
  • 2
2
votes
1 answer

Change the colormap of a contour plot in R

I am trying to change the default colormap of a contour plot, but I can't figure out how. This is the code I am using: library(rsm) A <- c(-1,+1,-1,+1,-1,+1,-1,+1) B <- c(-1,-1,+1,+1,-1,-1,+1,+1) y <- c(26,34,21,29,27,33,20,30) model <-lm(y ~…
Rosane Rech
  • 123
  • 1
  • 5
2
votes
1 answer

viridis with colorRampPalette output different vector lengths in R

I'm having some trouble to assign specific colors to a numeric vector. My interest is to use VAR1.color in as the ColSidecolors in heatmap.2. My data frame has 1655 rows with no missing values. I produce the colorRampPalette vector with the max…
RodrigoGM
  • 68
  • 5
2
votes
1 answer

ggmap: apply specific color to value after applying gradient scale

I'd like to be able to use a gradient to fill the colors on a map, but I need specific values (like zero) to be a specific color (say, red or grey). Is there some way to first apply the gradient, and then set these specific color values? I'd like…
jzadra
  • 4,012
  • 2
  • 26
  • 46
2
votes
1 answer

Need specific coloring in ggplot2 with viridis

Here's the situation, I am generating complex stacked bar charts with 20+ entries. However, downstream this is often reduced to only 5 or 6 entries. I want to use the colors from this downstream set and carry those back through to the more complex…
Dylan Lawrence
  • 1,503
  • 10
  • 32
2
votes
1 answer

Temperature Plot: Error in FUN(X[[i]], ...) : object 'y' not found

I am trying to plot the temperatures while taking the code from the link below: https://cran.r-project.org/web/packages/ggjoy/vignettes/gallery.html Here the author used y-axis as month axis but I want to use x-axis as month axis and y-axis as…
2
votes
3 answers

Shiny Server: leafet doesn't display viridis colors in legend

I have a problem plotting the colors of the legend using the viridis palette: the colors are not displayed although the legend labels are. I tested the same code under Ubuntu with Shiny Server v1.4.2.786 with Node.js v0.10.40 (it doesn't display…
CptNemo
  • 6,455
  • 16
  • 58
  • 107
1
vote
0 answers

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, which means that there are multiple colors instead…
jeanmichop
  • 11
  • 1
1
vote
2 answers

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'd like to restrict the colour range to between 10…
user438383
  • 5,716
  • 8
  • 28
  • 43
1
vote
0 answers

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 species on it. However when I run my code, the…
Fruuutz
  • 15
  • 3
1
vote
1 answer

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", na.value = "grey50", guide = "colourbar", aesthetics =…
matlabcat
  • 172
  • 2
  • 12
1
vote
0 answers

Mapping `int` value to color in a color palette

I've made a Python-based simulation that feeds into a 3D modeling program, Rhino for further calculations and to display the results. I'm wanting to color the objects based on a value generated by the simulation, preferably using a color pallet such…
Alex
  • 11
  • 3
1
vote
1 answer

echarts4r error at plotting barchart's colors

As you can see in the annexed image it seems that there is a problem with the e_visual_map() function from echarts4r. After y = aa the colors stop changing. Is there a way to fix the bar's…
Ian.T
  • 1,016
  • 1
  • 9
  • 19