-2

我想使用轴()在图的上方和右侧创建一个带有刻度和标签的图。如何抑制使用 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")
4

1 回答 1

6

?plot.default

plot(x, y, type="n", axes=FALSE, frame.plot=TRUE, xlab="", ylab="")
于 2012-09-06T16:31:04.963 回答