Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/64.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,我想使用axis()创建一个在绘图的上方和右侧带有记号和标签的绘图。如何抑制使用plot()函数“自动”打印的记号和标签?多谢各位 x<-1:10 y<-1:10 quartz("test") par(mar=c(10,10,10,10)+0.1)#sets margins of plotting area par(pty="s")#fixes the aspect ratio to 1:1 #Automatically adds ticks, numbers and axis

我想使用axis()创建一个在绘图的上方和右侧带有记号和标签的绘图。如何抑制使用plot()函数“自动”打印的记号和标签?多谢各位

x<-1:10
y<-1:10

quartz("test")
par(mar=c(10,10,10,10)+0.1)#sets margins of plotting area
par(pty="s")#fixes the aspect ratio to 1:1

#Automatically adds ticks, numbers and axis labels. How can I avoid this?
plot(x,y,typ="n")

#Adds axes above and to the right of plot area...I want these only
axis(side=4,las=2, ylab="y label")
axis(side=3,las=1,xlab="x label")

x请参见
?绘图。默认值

plot(x, y, type="n", axes=FALSE, frame.plot=TRUE, xlab="", ylab="")

你的一些问题很基本(我们都从这里开始)如果你确实是新手,我可以建议你学习一些关于R的知识吗?我想:1)使用
,然后使用object获得帮助;正如在
中一样?par
(在命令行中键入此项)2)使用,因为这样可以更轻松地搜索特定于R的内容3)软件包
sos
非常适合搜索感兴趣的项目。要获取它,请键入
install.packages(“sos”)
,然后使用
findFn(“感兴趣的主题”)
。这将有助于解决许多基本问题。4) 有时一开始就用
R
CRAN
进行谷歌搜索会很有成效。谢谢你的建议。我确实是个新手,但我也在写论文的最后20天。我很抱歉在这个场合问了一个愚蠢的问题。不过,有一点同理心会很好,因为之前对一些基本问题的回答相当苛刻(但不是你的)。