colorplaner | Visualize Two Variables Per Color Aesthetic through Color | Data Visualization library
kandi X-RAY | colorplaner Summary
kandi X-RAY | colorplaner Summary
The colorplaner R package is a ggplot2 extension to visualize two variables through one color aesthetic via mapping to a color space projection. With this technique for 2-D color mapping, one can create a dichotomous choropleth in R as well as other visualizations with bivariate color scales. The extension implements two new scales, scale_color_colorplane and scale_fill_colorplane, two new aesthetics, color2 and fill2, and a new guide guide_colorplane.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of colorplaner
colorplaner Key Features
colorplaner Examples and Code Snippets
Community Discussions
Trending Discussions on colorplaner
QUESTION
I have plotted a choropleth map of the US and overlaid data for each state. Now I am trying to add dots to certain latitudinal and longitudinal coordinates and thought adding geom_point to my ggplot would do the trick. I think I am having some issue with the input for aes and am having a lot of trouble figuring out how to fix this. Here is the code:
...ANSWER
Answered 2018-Mar-08 at 19:31In your global options for the plot, you had set:
QUESTION
I'm trying to plot a gradient fill map of all counties in the United States using the following code. I'd like to have a continuous darkblue -> darkred gradient fill for the map fill, but for some reason my code isn't doing this even though I added:
...ANSWER
Answered 2018-Feb-22 at 02:27You've set your fill
to a value and color
to NA in this line geom_sf(aes(fill=per_gop), color=NA)
. I suspect this means you should be using scale_fill_gradientn
not scale_color_gradientn
.
QUESTION
I'm trying to plot two variables taken from raster datasets on a map in R to produce something that looks a bit like this:
However, ideally I'd like the scale from bottom left to top right to be in greyscale (from light grey to black) thus highlighting areas where there is little divergence in the two variables.
So far this is what I have so far using the package colorplaner:
...ANSWER
Answered 2018-Feb-02 at 00:04You can do this by thinking in HSV space. https://en.wikipedia.org/wiki/HSL_and_HSV
The distance along the 45 degree line is value (light to dark).
The distance from that line is saturation (monochrome to colour)
The two different colours are just two choices of hue.
QUESTION
I have gotten a choropleth scripted for US county level data, but upon plotting it am finding it hard to read. The counties can get very crowded and begin blending in to each other - it becomes difficult to tell where one state ends and another begins. Does anyone know a method of plotting a choropleth map by county data and creating border outlines by state? Here is the code I have so far for reproduction:
...ANSWER
Answered 2017-Dec-13 at 19:32Here is a possibile solution:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install colorplaner
Due to ggplot2 2.2.0 changes, mapping a colorplane at the level of an individual layer will now produce a warning message, but functions normally. See ?colorplaner for more information.
Fixed an issue that was preventing updated vignettes from building
Complete versions of colorplaner and other_projections vignettes now included
Initial release of the colorplaner package
Implements two new ggplot2 scales: scale_color_colorplane and scale_fill_colorplane
Implements one new ggplot2 guide: guide_colorplane
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page