Skip to content

Commit

Permalink
Change example to demonstrate log scale
Browse files Browse the repository at this point in the history
  • Loading branch information
dmurdoch committed Nov 15, 2024
1 parent 9a0e46a commit 79f7c8d
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions man/axes3d.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -149,21 +149,21 @@ box around the plot, and
# add titles
title3d('main', 'sub', 'xlab', 'ylab', 'zlab')
rgl.bringtotop()
# Use a log scale for z
open3d()
points3d(rnorm(10), rnorm(10), rnorm(10))
# Use fixed axes
x <- rnorm(10)
y <- rnorm(10)
z <- exp(rnorm(10, mean = 3, sd = 2))
logz <- log10(z)
zticks <- axisTicks(range(logz), log = TRUE)
zat <- log10(zticks)
axes3d(c('x', 'y', 'z'))
# Put 4 x-axes on the plot
axes3d(c('x--', 'x-+', 'x+-', 'x++'))
plot3d(x, y, logz, zlab = "z")
axes3d(zat = zat, zlab = zticks, box = TRUE)
axis3d('x', pos = c(NA, 0, 0))
title3d('main', 'sub', 'xlab', 'ylab', 'zlab')
}
Expand Down

0 comments on commit 79f7c8d

Please sign in to comment.