Search
 
SCRIPT & CODE EXAMPLE
 

R

how to label legends in R ggplot

#create grouped boxplots with custom legend labels
p <- ggplot(data, aes(x=team, y=values, fill=program)) + 
       geom_boxplot() +
       scale_fill_discrete(labels=c('High Program', 'Low Program'))

#display grouped boxplots
p
Comment

PREVIOUS NEXT
Code Example
R :: r variables 
R :: ggplot2 graph in r 
R :: r - reorder columns in data frame 
R :: R remove commas 
R :: r type of object 
R :: r na if 
R :: calculating RMSE, MAE, MSE, Rsquared manually in R 
R :: mutate in r if else 
R :: moving average in r 
R :: knn in r 
R :: extract residual from lm in r 
R :: get list of words that are in two lists using set 
R :: angular material number picker 
R :: r dplyr summarize multiple columns 
R :: dplyr average columns 
R :: how to make date column index in R 
R :: r most likely outcome 
R :: del row matrix r 
R :: fcrit in r 
R :: predict y given model in r 
R :: r count dataframe 
Rust :: rust field is never read remove warning 
Rust :: vector in rust 
Rust :: rust concatenate strings 
Rust :: rust new vec 
Rust :: closure type in rust 
Rust :: Rust Multithreading with a Vector of different functions 
Rust :: lifetime may not live long enough 
Rust :: rust lang unresolved import 
Rust :: Transpose matrix, pass-by-reference to function 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =