An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090328/36a2c2c8/attachment-0002.pl>
number of ticks in a persp() plot
4 messages · a s, David Winsemius, Duncan Murdoch
a s <aquestsi <at> gmail.com> writes:
Hi, I am trying to specify four ticks (at 0,1,2,3 for the y axis) in a persp plot but the defaults overrule my specification and I obtain seven of them. Is it possible to gain full control over them in such a plot? Here is my code: matlines=matrix(c(1:7,3:9,3:9,2:8),nrow=7,ncol=4) persp(x=seq(1,7,1),
I am puzzled. You have just specified 7 "x" coordinates. Why did you expect to get fewewer than 7 points?
David Winsemius y=seq(0,3,1),z=matlines,theta=-30,phi=25,zlim=c (0,10),d=5,ticktype="detailed",xlab="x", > ylab="y",zlab="z") > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help <at> r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20090328/cb56a30f/attachment-0002.pl>
On 28/03/2009 9:42 PM, a s wrote:
Hi, I am trying to specify four ticks (at 0,1,2,3 for the y axis) in a persp plot but the defaults overrule my specification and I obtain seven of them. Is it possible to gain full control over them in such a plot? Here is my code: matlines=matrix(c(1:7,3:9,3:9,2:8),nrow=7,ncol=4) persp(x=seq(1,7,1),y=seq(0,3,1),z=matlines,theta=-30,phi=25,zlim=c(0,10),d=5,ticktype="detailed",xlab="x", ylab="y",zlab="z")
I don't think there is any way to specify the locations with persp. (You can use nticks=4 to reduce the number of ticks on all axes.) persp3d in the rgl package gives you more control, but with less flexibility about graphics devices. Duncan Murdoch