为带状图添加标签? [英] Adding labels to stripchart?
本文介绍了为带状图添加标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
带状图:< (b)
x <-c(2,8,11,19)
stripchart(x)
您如何在分数旁添加标签2,8,11,19?
解决方案使用
text
并指定 y
位置。带状图用 y = 1
绘制,所以 text(x,y = 1.1,...)
将绘制 x < - c(2,8,11,19)
带状图(x)
text(x,1.1,labels = x)
x <- c(2, 8, 11, 19)
stripchart(x)
How do you add labels 2, 8, 11, 19 next to the points?
解决方案
Use text
and specify the y
position. The stripchart is drawn with y=1
, so text(x, y=1.1, ...)
will draw the labels slightly above the points.
x <- c(2, 8, 11, 19)
stripchart(x)
text(x, 1.1, labels=x)
这篇关于为带状图添加标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文