Skip to main content

Questions tagged [scale-color-manual]

The tag has no usage guidance.

scale-color-manual
1 vote
1 answer
154 views

In ggplot(), is there something like `scale_color_manual(), but for line width and line type that can handle 12 lines?

My problem: I need to make many line graphs. Each line graph will contain 12 lines. Each line corresponds to a location. The code will be reused to make 15-20 such plots with standardized formatting. ...
Jeff Boggs's user avatar
0 votes
1 answer
237 views

ggplot: colour of line segments according to variable value, like scale_color_gradient2

I have a df "test_data", which contains values of the recent year ("recent"), the year before ("before") and the difference between these two ("delta"). in the ...
michel's user avatar
  • 33
1 vote
1 answer
60 views

How to color only certain variables in ggplot

I have this data Score<-c(-2, 3, 4, -1, 3, 4, 5, -1, 3, 5, -3, 3, 5, 1, -4, 5, -2, 1, 3, 4, -4, 2, -1, 3, 4, -2, 3, 4, -1, 3, 4, 5, -1, 3, 5, -3, 3, 5, 1, -4, 5, -2, 1, 3, 4, -4,...
JamesLancaster's user avatar
0 votes
0 answers
579 views

Using scale_color_manual in ggplot for a custom legend--colors are not matching the code

I am mapping two independent shapefiles and trying to build a custom legend with the necessary colors. The colors in the legend are not matching what is in the scale_color_manual command. Here is ...
Koda's user avatar
  • 177
0 votes
1 answer
712 views

How to have two scale_color_manuals in ggplot? [duplicate]

I am trying to plot a dataset where the points are colored using the specified colors and text labels are colored using different manually specified colors here is a dummy code to illustrate teh issue:...
yuliaUU's user avatar
  • 1,713
1 vote
1 answer
441 views

How do I add color to individual geom points?

Current Code: ggplot(compare, aes(x=specificity, y=false_positives)) + geom_jitter(height=.02, color=specificity) + scale_discrete_manual(values=c("#999999", "#E69F00", "#...
Antonio's user avatar
  • 407
0 votes
0 answers
100 views

Add custom legend for two variables from the same data set in R

I tried to add custom legend into my R plot that uses same x value but two different y values. I used the approach from the following post but it does not work: Custom legend for multiple layer ggplot ...
nemox007's user avatar
0 votes
1 answer
446 views

Why does ggplot scale_colour_manual na.value parameter not work?

I ran in trouble while using scale_colour_manual's na.value parameter. It simply does nothing. I use the following code to generate a filled contour plot. p1<-ggplot(wc_results_daily, aes(date_day, ...
krisldisl's user avatar
0 votes
1 answer
124 views

How do I combine scale elements by discrete color on ggplot heatmap?

output$fairness_heatmap <- renderPlot({ # Check the user's selection heatmap_data <- NULL groups <- NULL values <- NULL color <- NULL if (input$fairness_metric =...
Matthew Francis's user avatar
3 votes
2 answers
957 views

How to apply different colors for point and text but in the same group?

I am trying to draw a plot in which the colors of the points are red, green, blue for 3 groups and colors of the associated labels are darkred, darkgreen, darkblue. I tried the following code, but the ...
user19402456's user avatar
0 votes
1 answer
3k views

How to use scale_fill_manual to manually define bar plot colors

I am finalizing the representation of my dataset using ggplot2 and for the sake of clarity I would need a coloring scheme that defies standard ggplot2 "logic". Below is a fake dataset to ...
AndreBio's user avatar
0 votes
0 answers
44 views

Big grey area appears in ggplot

I try to plot my data (x-axis - wavelengths. y-axis - variable "FLUO", fluorescence) with gglot on a color scale of the light environment ("light_env_Xday"). My code for plotting ...
Paulina 's user avatar
0 votes
2 answers
217 views

How to fix the legend for a grouped scatter plot added with geom_ablines

I want to make a scatter plot with two different groups (based on Size) each plotted with specified colors (Blue and Red). In addition, I want to add 4 geom_ablines to the scatter plot with the same ...
Muhammad Usama Ashraf's user avatar
0 votes
1 answer
2k views

manually scale color of a factor in ggplot

Let's say i have a data frame like this id password year length Something 1 1234567 2001 7 good 2 pass4 2001 5 bad 3 angel3 2003 6 bad 4 ...
Em Manuel's user avatar
  • 103
2 votes
0 answers
166 views

Duplicate labels using manual scales and Tex command

Let's say that i have the following data. Data<-structure(list(Date = structure(c(14821, 14821, 14822, 14822, 14823, 14823, 14824, 14824, 14825, 14825, 14826, ...
Eve Chanatasig's user avatar

15 30 50 per page