抑制r绘图中的记号和标签
我想使用axis()创建一个在绘图的上方和右侧带有记号和标签的绘图。如何抑制使用plot()函数“自动”打印的记号和标签?多谢各位抑制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
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天。我很抱歉在这个场合问了一个愚蠢的问题。不过,有一点同理心会很好,因为之前对一些基本问题的回答相当苛刻(但不是你的)。