Skip to main content

Questions tagged [scale-color-manual]

The tag has no usage guidance.

scale-color-manual
0 votes
1 answer
506 views

ggplot, scale_colour_manual issues

Can anyone spot what is wrong in this code? a <- c("Afghanistan"="darkgreen","Iraq"="red" ,"Mali"="green", "Nigeria"="...
pegasus123's user avatar
0 votes
0 answers
137 views

scale colour problem when max and min are too distant

I am trying to create a dotplot in ggplot, were the scale colour represents the p-value of the data set, but it is not behaving as I expect. The max and min limits of this scale colour are so far in ...
Miriam Riquelme Pérez's user avatar
1 vote
1 answer
2k views

scale_color_manual not working for assigning custermized color [duplicate]

I am working on assigning the same action code with a specific color but the scale_color_manual does not works for me. The color picked up is still by default. Any suggestions? That will be really ...
YihanBao's user avatar
  • 543
1 vote
3 answers
1k views

Setting factor level to be invisible in ggplot2

I think there was an update to ggplot2 that I missed and some things have apparently changed. For a factor level of a variable to be omited or "invisible" you used to be able to set a named ...
Paul Eagle's user avatar
0 votes
1 answer
337 views

ggplot colors correct on legend, wrong on plot?

The legend looks right, but the last two plotted geom_line curves (e.x and ten.x) are grayed-out on the plot. How to fix? 1 Xp <- 1:20/5 X <- -10:10/5 X10 <- -10:5/5 df <- data.frame( ...
Steven Bhardwaj's user avatar
3 votes
1 answer
7k views

ggplot2 scale_color_manual showing all values in legend

I have a report that I create and update which has many different sites for different parameters. Not all parameters are measured at every site. I created a manual color scale so that the sites show ...
Sean Mc's user avatar
  • 33
0 votes
0 answers
108 views

Wrong matching of colours in ggplot using scale color discrete [duplicate]

ggplot() + geom_line(data=Final_UDR_summary, aes(y=pass_rate_IIR, x=year_week, color="blue"),size=1) + geom_line(data=Final_UDR_summary, aes(y=pass_rate_IQR, x=year_week, color=&...
user15981608's user avatar
0 votes
2 answers
2k views

ggplot2 displays wrong colors with manual scale [closed]

I am trying to plot my data with manual color scale based on values. However the colors that are displayed nowhere near correspond to the values that I provide. My data looks like this: # A tibble: ...
kolin's user avatar
  • 53
0 votes
1 answer
1k views

How to fix scale_color_manual? This is not working properly anymore

I am currently struggling with scale_color_manual in ggplot2, although this has never been a problem. I keep getting the error message: "Error: Insufficient values in manual scale. 9 needed but ...
Chiara Homann's user avatar
0 votes
1 answer
542 views

change environment size on scale_colour_manual to assign colour to factors to use across multiples plots

I need to make 5 plots of bacteria species. Each plot has a different number of species present in a range of 30-90. I want each bacteria to always have the same color in all plots, therefore I need ...
Marcela P.'s user avatar
2 votes
1 answer
808 views

How to highlight a single value on a continuous color scale in ggplot2

A question posted here shows how to declare some of the values missing. I have a similar problem except I wish to highlight a single value with a different color eg. mpg = 20. Ideally, I would like it ...
gokhale's user avatar
  • 41
0 votes
1 answer
379 views

Incorrectly displayed names using scale_linetype_manual in r

Let's say that my data is the following structure(list(Date_spill = structure(c(14821, 14821, 14821, 14822, 14822, 14822, 14823, 14823, 14823, 14824, 14824, 14824, 14825, 14825, 14825, 14826, 14826, ...
Eve Chanatasig's user avatar
0 votes
1 answer
109 views

control overlaying lines while color is continuous value in ggplot

I have a data and would like to plot the lines and have control over the order that lines are laying on top of each other. I would like to use 'cale_color_viridis()' as my pallet. I have no idea how ...
say.ff's user avatar
  • 375
1 vote
1 answer
748 views

Share a continuous value-color mapping across several ggplots

I want to make 4 side-by-side scatterplots in ggplot. In each plot, I am coloring the dots by a continuous variable. I would like to have the same values map to the same colors across the four plots ...
acn's user avatar
  • 65
1 vote
1 answer
1k views

ggplot geom_point colour based on multiple factors

I have a dataframe where I am trying to plot the points and separate them based on colour. I can successfully do this if I just set general boundaries like values = c("(-Inf,1]" = "...
L55's user avatar
  • 213

15 30 50 per page