Skip to content

Commit e7b8682

Browse files
authored
Merge pull request #285 from alan-turing-institute/fix_matdist_limits
fix matdist lims
2 parents bb410f4 + 43f3bec commit e7b8682

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: distr6
22
Title: The Complete R6 Probability Distributions Interface
3-
Version: 1.6.14
3+
Version: 1.6.15
44
Authors@R:
55
c(person(given = "Raphael",
66
family = "Sonabend",

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# distr6 1.6.15
2+
3+
* Fix bug in `plot.Matdist` x limits
4+
15
# distr6 1.6.14
26

37
* Fix bug when extracting a single distribution with a logical vector from `MatDist`

R/plot_matdistribution.R

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,12 @@ plot.Matdist <- function(x,
3737
val <- -log(1 - gprm(x, "cdf"))
3838
}
3939

40-
graphics::matplot(t(val), type = "l", ...)
40+
times <- as.numeric(colnames(val))
41+
graphics::matplot(t(val), type = "l", xaxt = "n", ...)
42+
axis(
43+
1,
44+
seq(0, length(times), length.out = 5),
45+
round(seq(min(times), max(times), length.out = 5))
46+
)
47+
4148
}

0 commit comments

Comments
 (0)