Skip to content

Commit

Permalink
debug alluvia form neg obs + version patch
Browse files Browse the repository at this point in the history
  • Loading branch information
corybrunson committed Nov 28, 2019
1 parent cdabda1 commit 21b0371
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ggalluvial
Type: Package
Title: Alluvial Plots in 'ggplot2'
Version: 0.11.0.0001
Version: 0.11.1
Date: 2019-11-25
Authors@R: person('Jason Cory', 'Brunson', email = '[email protected]',
role = c('aut', 'cre'))
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

# next version (v1.0.0?)

# ggalluvial 0.11.1

This patch fixes a bug with including negative observations in alluvia-form data due to outdated code that prohibited negative `y` values. This was discovered while drafting two examples of this usage, which are included in the documentation.

# ggalluvial 0.11.0

## Parameter renamings, deprecations, and additions
Expand Down
11 changes: 11 additions & 0 deletions inst/examples/ex-stat-flow.r
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ ggplot(vaccinations,
stat_stratum(alpha = .5) +
geom_flow(max.y = 100) +
geom_text(stat = "stratum")
# negate missing entries
ggplot(transform(vaccinations, count = freq * (-1) ^ (response == "Missing")),
aes(y = count,
x = survey, stratum = response, alluvium = subject,
fill = response, label = response,
alpha = response != "Missing")) +
stat_stratum() +
geom_flow() +
geom_text(stat = "stratum", alpha = 1) +
scale_alpha_discrete(range = c(.2, .6)) +
guides(alpha = FALSE)

# aesthetics that vary betwween and within strata
data(vaccinations)
Expand Down
11 changes: 11 additions & 0 deletions man/stat_flow.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 21b0371

Please sign in to comment.