From c82e8425caa6db424a0580ed36b2711ea16f13f5 Mon Sep 17 00:00:00 2001 From: Duncan Murdoch Date: Fri, 15 Nov 2024 07:56:01 -0500 Subject: [PATCH] Change example to demonstrate log scale --- NEWS.md | 4 +++- cran-comments.md | 8 +++++--- man/axes3d.Rd | 21 +++++++++++---------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/NEWS.md b/NEWS.md index 50d3ca39..6d2651d8 100644 --- a/NEWS.md +++ b/NEWS.md @@ -3,13 +3,15 @@ ## Minor changes * `rgl.incrementID()` has been added. +* An example using log axes has been added to the +help page for `axes3d()`. ## Bug fixes * `clear3d("all")`, calling `bg3d()` on the root subscene, and some cases of `pop3d()` involving the background could create a leak of a background object -(issue #439). For back compatibility, these cases +(issue #439). For back compatibility of saved results, these cases still increment the object ID number, but don't actually create a new object. * `rglwidget()` displays didn't support objects with diff --git a/cran-comments.md b/cran-comments.md index ec8406e5..29077d37 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,4 +1,6 @@ -# 1.3.12 +# 1.3.14 -This contains a number of bug fixes and minor changes. Among -other things, it fixes the notes shown on CRAN. +This small release fixes a memory leak that was +introduced in the last release. + +Other minor changes are described in the NEWS. diff --git a/man/axes3d.Rd b/man/axes3d.Rd index 3e2c7269..2be44515 100644 --- a/man/axes3d.Rd +++ b/man/axes3d.Rd @@ -149,21 +149,22 @@ 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)) - axes3d(c('x', 'y', 'z')) - - # Put 4 x-axes on the plot - axes3d(c('x--', 'x-+', 'x+-', 'x++')) + logz <- log10(z) + zticks <- axisTicks(range(logz), log = TRUE) + zat <- log10(zticks) + + 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') }