我在这里添加了一个数据子集。我有三个向量如下:
c1<- c(-0.752828459121719, -0.706604166599532, 0.41692675932805, -0.367361148236791,
-0.444856002001598, 0.0900489872320513, 0.468315685498606, -0.464037640553016,
-0.846707525111339, -0.506632302047084)
c2<-c(-0.228923493559715, -0.42723511806437, -0.238069534709052, 0.294663044558574,
-0.167947363700495, 0.384663250370909, -0.576133689238721, 0.391568870938566,
-0.1713203525461, 0.137870084258999, -0.56998356645267, -0.79334893711356,
-0.255524488425102, -0.0836927043466483, 0.98138909501453, -0.0762620826749111,
0.276135990737646, 0.0967624538454235)
c3<-c(0.614217318387036, -0.678156662533459, 0.984482342663281, -0.733498306613966,
-0.827978692596204, 0.893020146193421, 0.622541843393445, 0.349300942014951, 0.323917293456244, 0.715438132732889, -0.223319925026617, 0.660588831775187,
-0.234554629428742, -0.0923738721559019, -0.124609065879424,
-0.448912579628426, -0.961918202616368, -0.117716470119246, -0.62850739905694,
0.532566335430782, -0.782123992693959)
使用multhist包,
l<-list(c1,c2,c3)
multhist(l, col=c("red","green","blue"))
我获得了直方图
但我想将X轴范围从-1更改为+1(中断为0.1),以便我可以清楚地显示值为-1,-0.9,-0.8,-0.7等等直到+1。即使已经从stackoverflow(How to set xlim in multhist?)
中跟随以下问题,我也无法做到