Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample points uniformly from transformed space #2095

Merged
merged 6 commits into from
Oct 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ggplot2 2.2.1.9000

* Fix bug in secondary axis that would lead to incorrectly placed ticks with
strong transforms (@thomasp85, #1992)

* Fix `update_geom_defaults()` and `update_stat_defaults()` to allow American spelling of aesthetic parameters (@foo-bar-baz-qux, #2299).

* Fixed bug when setting strips to `element_blank()` (@thomasp85).
Expand Down
4 changes: 2 additions & 2 deletions R/axis-secondary.R
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ AxisSecondary <- ggproto("AxisSecondary", NULL,
if (self$empty()) return()

# Get original range before transformation
inv_range <- scale$trans$inverse(range)
along_range <- seq(range[1], range[2], length.out = self$detail)
old_range <- scale$trans$inverse(along_range)

# Create mapping between primary and secondary range
old_range <- seq(inv_range[1], inv_range[2], length.out = self$detail)
full_range <- self$transform_range(old_range)

# Test for monotonicity
Expand Down
2 changes: 1 addition & 1 deletion tests/figs/deps.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
vdiffr: 0.1.1.9000
vdiffr: 0.1.1
svglite: 1.2.0.9001
ggplot2: 2.2.1.9000
Loading