outcome is different by typing command.
when we make 2 graphs in one plot, the 2 plots sin and cos with their name appears; but I can only see sin name without cos name even after typing correct command. My plot names are not completely visible.
R Introduction-to-ggplot2 06-07 min 50-60 sec
Answers:
Could you please share the exact command which you are talking about?
Try increase area of plots window (say to 75%) in RStudio
c("sin(x)", "cos(x)"),
fill=c("blue","red"))
y <- sin(x)
plot(x, y)
plot(x, y, main="Plotting a Sine Curve", ylab="sin(x)")
plot(x, y, main="Plotting sine curve", ylab="sin(x)", type="l", col="blue")
plot(x, sin(x), main="Plotting Sine and Cosine graphs on the same plot",
ylab=" ", type="l", col="blue")
lines(x, cos(x), col="red")
legend("topleft",
c("sin(x)", "cos(x)"),
fill=c("blue","red"))