On 6/22/25 10:13, Duncan Murdoch wrote:
On 2025-06-22 8:15 a.m., Spencer Graves wrote:
If the range fed to axTicks is too narrow, the output is only 2 points;
shouldn't it degenerate to using "pretty" in such cases?


EXAMPLE:


ylims2 <- c(0.2, 0.8)
get_axp <- function(x) 10^c(ceiling(x[1]), floor(x[2]))
## mimic par("yaxs") == "i"
usr.i2 <- log10(ylims2)
(aT.i2 <- axTicks(side = 2, usr = usr.i2,
        axp = c(get_axp(usr.i2), n = 3), log = TRUE, nintLog = 5))
#[1] 0.2 0.5

I don't understand your point.  If I do

   plot(ylims2, ylims2, log="xy", yaxs="i", xaxs="r")

then both axes get ticks at the pretty(ylims2) locations.  If I set yaxp or xaxp to the  values you used, then I get c(0.2, 0.5), but why would I do that?


I want to plot one set of points and lines with 3 axes for both : for the cumulative hazard (H), the survival probability [S = exp(-H)], and the probability of failure (1-S).


I'm programming around it. This may be too rare an application to bother with.


Thanks for the reply. Spencer Graves


p.s. My specific application is my claim that the hazard rate for a nuclear war in the next year increases with the time since the last detonation in anger, namely Nagasaki 1945-08-09, for two reasons: (1) Nuclear proliferation and (2) managers of complex systems subject to rare but catastrophic failures "learn" from experience that they can "safely" take ever greater risks -- until a catastrophe proves them wrong. I estimate a range of subjective probabilities that each of 13 major "nuclear close calls" like the 1962 Cuban missile crisis might have actually ended in a nuclear war, converted each range into a range for the cumulative hazard for each incident, then summed imputed means and variances for the computed hazard to get a total cum hazard. Then I converted that to the estimate of the Weibull scale parameter assuming the shape parameter is 1, 1.5, or 2:


https://docs.google.com/spreadsheets/d/18Iutk8BqmiBND06xbjCIP6DmxMKAliyxO9g88sL5e2Y/edit?usp=sharing


After I get my plot, I plan to post a description of this to Wikiveristy and then circulate that to leading experts and potential collaborators in getting something on this published.


Duncan Murdoch


______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to