小编use*_*564的帖子

如何告诉R在散点图上用颜色填充圆点?

我想用颜色填充散点图上的实心圆点.我试过这个:

>  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)

这是行不通的.我很感激建议/帮助.:)

r

7
推荐指数
1
解决办法
2万
查看次数

如何修改箱形图的缺口错误?

我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

3
推荐指数
1
解决办法
4842
查看次数

标签 统计

r ×2