我想用颜色填充散点图上的实心圆点.我试过这个:
> plot(dframe1$TV~dframe1$Books)
> xlab="Number of books read per month"
> plot(dframe1$TV~dframe1$Books,
xlab="Number of books read per month")
> plot(dframe1$TV~dframe1$Books,
xlab="Number of books read per month",
ylab="Hours of TV watched per week",
main="Associations between time spent watching TV and reading",
col.main="red",
cex=1.5,
pch=21,
bg=”light green”)
Error: unexpected input in:
"pch=21,bg=”"
Run Code Online (Sandbox Code Playgroud)
这是行不通的.我很感激建议/帮助.:)
我boxplot在下面的代码中包含了一些凹槽:
> boxplot(dframe1$High.calcium..diet, dframe1$Low.calcium.diet, # The basic boxplot command
+ varwidth = FALSE, # width of boxes represents sample size
+ notch = TRUE, # add a notch indicating 95% confidence intervals
+ names = c("High Calcium diet", "Low Calcium diet"), # labels the different boxes
+ col=c("violet", "light green"), # colours the different boxes
+ xlab = "Diet", # adds an x-axis label
+ ylab = "parathyroid hormone per 100 ml blood", # adds a y-axis label …Run Code Online (Sandbox Code Playgroud) r ×2