Rui:
Thank you very much for your help! It works the way you do. My problem
was with the time I declare the control group:
My code:
p <- ggplot(data, aes(Pretrend, Outcome))
+ geom_point(aes(colour=factor(Control))
Your solution:
p <- ggplot(data, aes(Pretrend, Outcome, colour = factor(Control))
To Norberto;
Your code _probably_ would have succeeded if you had used color as a grouping
argument, or you could have used group or linetype or probably others, but I
find locating the listing of ggplot2 "behavioral" parameters rather
frustrating. These details are not to be found in any of ?a
Hello,
I am not understanding the problem.
With a made up dataset everything seems right.
set.seed(1234)# make the results reproducible
n <- 10
data <- data.frame(Pretrend = rep(1:10, 2),
Outcome = 1:10 + rnorm(2*n),
Control = rep(1:2, each = n))
libra
> On Feb 12, 2019, at 2:09 PM, Norberto Hernandez
> wrote:
>
> Hi! I am trying to make a scatter/path graph in one variable that is
> divided in two groups (variable Control), but when I use the
> geom_path() option, the line continues from the group one to the group
> two, and I wasn't able
Hi! I am trying to make a scatter/path graph in one variable that is
divided in two groups (variable Control), but when I use the
geom_path() option, the line continues from the group one to the group
two, and I wasn't able to avoid it.I need the path draws over the
group one and then draws over th
Hi! I am trying to make a scatter/path graph in one variable that is
divided in two groups (variable Control), but when I use the geom_path()
option, the line continues from the group one to the group two, and I
wasn't able to avoid it.I need the path draws over the group one and then
draws over th
6 matches
Mail list logo