Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/backbone.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
勾选R中的文本方向_R_Plot - Fatal编程技术网

勾选R中的文本方向

勾选R中的文本方向,r,plot,R,Plot,我可能忽略了一些显而易见的事情,但也许其他人也会忽略 我在R图的x轴上用了很多记号。 我缩小了边距文本以腾出空间(使用cex.axis),但我想要更多,如果我可以使文本垂直,那就更好了。这些命令将使x轴文本垂直: ##The numbers next to the tick marks par(las=3) plot(x=1:10, y=1:10, xlab="") ##The x-axis label mtext("sfdf", 1, las=3, adj=3) 实际上,las=2使轴标签

我可能忽略了一些显而易见的事情,但也许其他人也会忽略

我在R图的x轴上用了很多记号。
我缩小了边距文本以腾出空间(使用
cex.axis
),但我想要更多,如果我可以使文本垂直,那就更好了。

这些命令将使x轴文本垂直:

##The numbers next to the tick marks
par(las=3)
plot(x=1:10, y=1:10, xlab="")

##The x-axis label
mtext("sfdf", 1, las=3, adj=3)

实际上,
las=2
使轴标签始终垂直于轴
las=3
使它们垂直。太棒了!塔克斯!为什么我在谷歌上很难找到它?在回答你们关于搜索的问题时。尝试在搜索列表中使用r-project:这取决于您正在打印的内容,但有时最好交换x轴和y轴,以便所有这些标签都可以有水平文本。