Anthony Pezzola
2007-Jul-06 21:31 UTC
[R] Changing Tick Mark Values for lattice / wireframe
How can I change the tick mark values in lattice, specifically wireframe? I have a 11*46 matrix of values that I am plotting using wireframe. Unfortunely, the values range from 0.1-1.1 and 0.5-5. Using the code below the tick marks have are (2,4,6,8,10) and (10,20,30,40). Thanks in advance. graphic5 <- wireframe(output.matrix, shade= TRUE, scales = list(arrows = FALSE, cex=.6, col="black", font= 3, tck=1), xlab=list("Employees", cex=.65, col="black", rot=30), ylab=list("Political Concentration", cex=.65, col="black", rot=-40), zlab=list(label="Probability of Protection", cex=.65, rot=90, col="black") )
Deepayan Sarkar
2007-Jul-06 21:51 UTC
[R] Changing Tick Mark Values for lattice / wireframe
On 7/6/07, Anthony Pezzola <apezzola at reed.edu> wrote:> How can I change the tick mark values in lattice, specifically wireframe? > > I have a 11*46 matrix of values that I am plotting using wireframe. > Unfortunely, the values range from 0.1-1.1 and 0.5-5. Using the code > below the tick marks have are (2,4,6,8,10) and (10,20,30,40).You will need to use the formula method. Here's one possibility: mydata <- expand.grid(row = rowvals, column = colvals) mydata$z <- as.vector(as.numeric(output.matrix)) wireframe(z ~ x * y, data = mydata, ...) It probably makes sense to allow this for matrices directly, and I'll add something in the next update. -Deepayan> Thanks in advance. > > graphic5 <- wireframe(output.matrix, shade= TRUE, > scales = list(arrows = FALSE, > cex=.6, col="black", font= 3, tck=1), > xlab=list("Employees", cex=.65, col="black", rot=30), > ylab=list("Political Concentration", cex=.65, col="black", rot=-40), > zlab=list(label="Probability of Protection", cex=.65, rot=90, col="black") > ) > > ______________________________________________ > R-help at stat.math.ethz.ch 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. >
Possibly Parallel Threads
- nlme package - unbalanced data and Croissant (2008)
- [lattice] Increase distance between tick labels and ticks in wireframe plot ("pad")
- Suppress only Z axis tick marks and numbers in wireframe statement
- lattice.wireframe missing wireframe
- lattice: wireframe "eats up" points; how to make points on wireframe visible?