I cannot changethe default position of legend of this plot.
ggline(data = A,x="time",y="survival",
group="Concentration",color = "Concentration",add = c("mean_sd"),
xlab = "Time(hpf)",ylab = "Survival(%)",
theme_bw(),
palette =c("#CC0066 ","green","#FFFF00 ","#000999 ","#66CCFF ","#FF9900 ","#FF0000 "),
linetype = "solid")
FJCC
February 2, 2024, 6:45am
2
Try something like
p <- ggline(data = A,x="time",y="survival",
group="Concentration",color = "Concentration",add = c("mean_sd"),
xlab = "Time(hpf)",ylab = "Survival(%)",
theme_bw(),
palette =c("#CC0066","green","#FFFF00","#000999","#66CCFF","#FF9900","#FF0000"),
linetype = "solid")
ggpar(p, legend = "top")
The documentation for the legend
argument of ggpar says:
"character specifying legend position. Allowed values are one of c("top", "bot-
tom", "left", "right", "none"). To remove the legend use legend = "none". Leg-
end position can be also specified using a numeric vector c(x, y)"
Thank you so much. Got it sorted.
system
Closed
February 23, 2024, 7:01am
4
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.