Skip to content

Commit

Permalink
remove spacing from barplot in plot.epidist and specifying ylim for d…
Browse files Browse the repository at this point in the history
…iscrete cdf
  • Loading branch information
joshwlambert committed May 24, 2024
1 parent c134a8b commit 20d55f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,18 @@ plot.epidist <- function(x,
if (cumulative) {
graphics::barplot(
height = cdf(x, q = unique(round(xlim))),
space = 0.2,
space = 0,
names.arg = unique(round(xlim)),
xlab = xlab,
ylab = "",
ylim = c(0, 1),
main = "Cumulative Distribution Function",
...
)
} else {
graphics::barplot(
density(x, at = unique(round(xlim))),
space = 0.2,
space = 0,
names.arg = unique(round(xlim)),
xlab = xlab,
ylab = "",
Expand Down

0 comments on commit 20d55f9

Please sign in to comment.