Hello,
The error comes from having 2 colors and 4 labels in
scale_colour_manual("", values = c(f_cols[1], m_cols[1]), labels =
c("F", "M" , "C" , "G"))
You need the same number of colors and labels. For instance, though
they're probably not the colors you want the following vector has 4
c
Thanks everyone for being so kind and patient with me throughout the
process! Mr. Barradas and Mr. Lemon, very generous of you for taking the
time and patience to go over my code and data , and taking the time to give
me meaningful feedback!
With your help and suggestion, I was successful in makin
Hi Tariq,
There were a couple of glitches in your data structure. Here's an
example of a simple plot:
dat<-structure(list(year = c(2018, 2019, 2019, 2019, 2019, 2019, 2019,
2019, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017, 2017,
2017, 2017, 2018, 2018, 2018, 2018, 2018, 2018, 2018, 2018,
Hello,
First of all, I'll repost the data at end because the OP posted with a
pointer ref:
problems =
and this must be removed for the dput output to run.
Suggestion: coerce to class "data.frame" and post the output of
dput(as.data.frame(dat))
Now the plot.
Here are two plots of share by
4 matches
Mail list logo