[英]barplot legend in R and the x axis label adjustment
我使用了代碼
width <- FalikData$width #This creates a vector of data of the plant stomatal widths
plant <- FalikData$plant #The creates a vector of data of the plant ID numbers
barplot(width, names.arg= plant,
col = c("blue", "red"),
xlab = "Plant",
ylab = expression("Stomatal Opening("~mu~"m)"),
legend = (FalikData$type), beside = TRUE)
type plant width
control 1 12.109661 15min 1 11.577023 control 2 11.608355 15min 2 10.903394 control 3 9.446475 15min 3 12.093995 control 4 9.697128 15min 4 11.013055 control 5 10.840731 15min 5 11.483029 control 6 10.746736 15min 6 7.221932 control 7 10.605744......
我想你正在尋找這個
barplot(width, names.arg= plant,
col = c("blue", "red"),
xlab = "Plant",
ylab = expression("Stomatal Opening("~mu~"m)"))
legend("topleft",
fill = c("blue","red"),
legend = c("control", "15min"))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.