colorbrewer Questions
11
I am plotting a categorical dataset and want to use distinctive colors to represent different categories. Given a number n, how can I get n number of MOST distinctive colors in R? Thanks.
Blane asked 7/3, 2013 at 21:59
2
I am sorry I cannot offer an image because of limited reputation I have on this site...
I used the following code to generate my line chart in R:
p <- ggplot()+
geom_line(data=data, aes(x, y, ...
Ijssel asked 6/4, 2015 at 6:12
1
Solved
I am trying to set up a global ggplot2 color scheme in my global RMarkdown files and I had success with viridis with the following code
options(
ggplot2.continuous.colour = "viridis",
g...
Namecalling asked 1/7, 2021 at 3:15
2
I am attempting to make a map of global data anomaly (precip, temp etc) and need to use a diverging color palette. I have code that runs well with scale_color_viridis but it does not easily convert...
Percent asked 19/7, 2019 at 20:15
2
Solved
I am wondering, how is it possible to get the HEX # for brewer color palettes?
https://learnr.wordpress.com/2009/04/15/ggplot2-qualitative-colour-palettes/
Partitive asked 5/4, 2020 at 21:34
3
Solved
I have ordered categorical data that I would like to use color brewer on. But I have a hard time seeing the very light lower values. Is there a way to either trim off those lower values or set the ...
Blindstory asked 21/11, 2014 at 6:3
2
Solved
library(tidyverse)
library(RColorBrewer)
mtcars %>%
count(cyl) %>%
ungroup() %>%
ggplot(aes(cyl, n)) +
geom_line(size = 3) +
scale_color_brewer(palette = "Accent")
I'll often h...
Centurial asked 15/4, 2019 at 14:4
1
I would like to plot 1950 world population in density map with tmap package.
And I break the population data into 22 categories manually, and fill with different color for each category.
My code is...
Heads asked 22/3, 2018 at 7:36
2
I am trying to create horizontal bar plot and would like to fill the individual bar as per their log fold values, white for lowest value and darkest for highest value. However, I am not able to do ...
Sloth asked 21/3, 2018 at 1:59
1
Solved
I'm making a scatterplot of 2 continuous variables and a 4-level factor in R, using ggplot2. The 4-level factor column has some NAs in it.
p1 <- qplot(x_var, y_var, color=4_factor, data=df)
p1
...
Emlen asked 14/4, 2016 at 15:7
2
Solved
I want to have a polygon type of spatial plots using ggplot. In which, polygons are plotted and color of polygons are decided by its weight.
Sample data frame look like - (here is the data file C...
Scurrility asked 27/3, 2015 at 13:16
1
how can I see what colors ggplot2 is using for discrete categories using a given palette, like "Set1" or "Set2" for brewer? i.e. for a given set of categories what the colors that will be used are?...
Methedrine asked 20/3, 2015 at 20:29
2
sorry if i'm missing something fundamental about how colorRampPalette and brewer.pal work, but how can you create a qualitative color gradient based on multiple variables? my goal is to create a mu...
Psychobiology asked 25/10, 2014 at 13:30
1
Solved
I'm plotting maps using contourf and I'd usually go with the default (rainbow) colorscheme with levels = 50.
#Various imports
#LOTS OF OTHER CODE BEFORE
plot = plt.contourf(to_plot, 50)
plt.show(...
Dare asked 6/8, 2014 at 17:45
2
Quite often I use a diverging colour palette mapped to a parameter that has an interesting turning point somewhere near the middle.
Unfortunately, available diverging palettes -- e.g. those from ...
Parnell asked 23/5, 2014 at 16:53
1
Solved
I want to use scale_colour_brewer() and scale_fill_brewer() to specify the fill or colours via the brewer palette:
diagram <- diagram + scale_colour_brewer() + scale_fill_brewer()
Nevertheles...
Rattlebrain asked 28/4, 2014 at 10:36
1
Solved
I'm using ggplot2 to create quite a few facet_wrapped geom_line plot.
Although each plot only has a maximum of eight lines, when taken together, there are more like twenty categories to show on th...
Amil asked 27/2, 2013 at 12:42
1
Solved
I have data as follows:
10 states
Each state has two types
Each type has between 1 and 29 entities
Each state-entity-type has a count
Complete data available as a gist.
I'm trying to visualiz...
Northrop asked 8/2, 2013 at 15:22
2
Solved
I have a R dataframe (df), which I am plotting as a bar graph in ggplot2 and coloring based on a column in the dataframe (df$type). Right now, I am using the default coloring pattern (scale_fill_br...
Rickety asked 20/5, 2011 at 16:48
1
© 2022 - 2024 — McMap. All rights reserved.