How can one change this viridis color platte as shown below to other types of viridis color palette??The code used and the map displayed below is shown for reference:

Changing Viridis to different color palette
249 Views Asked by Prabhakar At
2
There are 2 best solutions below
0
Salix
On
Since the question asked specifically about the viridis color palette, code would be :
library(mapview)
data(franconia)
mapview(franconia,
zcol = "district",
col.region=viridis::viridis_pal(option = "A"))
Where you can change option="A" for "B" or "C" (the current palette used is "D").
For using the other gradients from viridis, you can use
library(mapview)
data(franconia)
mapview(franconia,
zcol = "district",
col.region=viridis::mako(n = 3))
where n must be at least as big as the number of discrete variable or bins. For your gradient, I see you have 6 values on your scale, so I'd put n at 6.
Related Questions in R
- in R, recovering strings that have been converted to factors with factor()
- How to reinstall pandoc after removing .cabal?
- How do I code a Mixed effects model for abalone growth in Aquaculture nutrition with nested individuals
- How to save t.test result in R to a txt file?
- how to call function from library in formula with R type provider
- geom_bar define border color with different fill colors
- Different outcome using model.matrix for a function in R
- Creating a combination data.table in R
- Force specific interactions in Package 'earth' in R
- Output from recursive function R
- Extract series of observations from dataframe for complete sets of data
- Retrieve path of supplementary data file of developed package
- r package development - own function not visible for opencpu
- Label a dataset according to bins of a histogram
- multiply each columns of a matrix by a vector
Related Questions in CHOROPLETH
- Making a zip code choropleth in R using ggplot2 and ggmap
- Error: isTRUE(gpclibPermitStatus()) is not TRUE
- R choropleth map of the Dominican Republic
- c("region", "value") %in% colnames(user.df) are not all TRUE
- How to Create a Choropleth or Bubble Map of UK in R
- D3: scale and color for choropleth map
- D3 Choropleth Map
- How does it make the background of that country? (Plotly)
- Choropleth Map Python with Date Slider
- Python px.choropleth mapbox change between variables
- Plotly Choropleth data missing after exporting to html file
- Choropleth Map Using Python
- Leaflet popup graphs don't correspond to map
- Why is my choropleth coming out all the same colour?
- unusual black shapes in d3 choropleth
Related Questions in COLOR-PALETTE
- html5 canvas circle palette
- Grabbing color palette from YouTube thumbnail
- PBO Indexed Color Texture Rendering with Palette in Fragment Shader not working
- HTML5 Canvas circle palette need custom size
- Abstract fields implemented by static final class?
- How do I combine similar elements in a list in python?
- How to read a palette image as a scalar image with ITK?
- Change size array in ColorPalette.Entries
- error: Error: No resource found that matches the given name: attr 'colorAccent'
- Multiple palettes and empty labels from file entries using matrix with image in gnuplot
- Display custom color dialog directly- JavaFX ColorPicker
- Simple swift color picker popover (iOS)
- How can I attach a list of custom color palettes to a list of ggplot objects without printing each plot object to the screen?
- Use a color palette for matrix points in UpSetR
- How do I make a lighter version of a colour using PHP?
Related Questions in R-MAPVIEW
- Increasing pandoc memory allocation using mapview in R
- R mapshot cannot create self-contained html
- How to set boundaries with leaflet and export to pdf with mapshot?
- How do i get mapview to plot my raster image with the same colors as plotRGB or plot
- mapview doesn't show multipolygons of a query from osmdata
- Merging a Shapefile and a dataframe
- How to force r-mapview to show all data on popup or certain rows, regardless of zcol=
- Locking the zoom in on Mapview?
- Why have I lost ability to use mapshot
- R mapview: Point border color by group
- Overlay raster RGB and polygon layer in leaflet/mapview with custom CRS in R
- Changing Viridis to different color palette
- apply mapview::popupTable function including multibyte column name
- Altering Linewidth and Color for LineString Objects in Mapview
- Why is st_buffer function not creating an R object that correctly displays in mapview?
Related Questions in VIRIDIS
- Temperature Plot: Error in FUN(X[[i]], ...) : object 'y' not found
- generate very different colors [R] from unique categories
- Is it possible to usa a custom-defined palette in ggplot2?
- Set the max value in colormap when using scale_color_viridis
- Need specific coloring in ggplot2 with viridis
- R ggplot graph color gradient same for two different plots
- How can I delete the background in stat_density_2d?
- Is there a way to add the viridis color palette to a spplot having these requirements?
- Changing Viridis to different color palette
- How can I use a custome colour fill (viridis) when also using the aes(colour= variable)
- Python pcolor and colorbar dont use the whole colormap
- How to use a non-default colorscale in R plotly chloropleth maps?
- Is there any way to add a color palette into the size aesthetic?
- Generating two non-overlapping colorspaces
- Restore full dynamic range to a subsection of a colormap
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
The
col.regionsoption does that. You can give it a different color palette as an argument:Created on 2022-06-03 by the reprex package (v2.0.1)