-
Notifications
You must be signed in to change notification settings - Fork 2k
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
scale_binned #3096
scale_binned #3096
Conversation
Do you think we can implement this as such options of |
@yutannihilation I think other parameters would have to be changed, such as the default guide, so having a separate scale function may be needed after all. If we go with the naming for the viridis scale, Also, is it time to overhaul the guide system and port it to ggproto? It's the only part of ggplot2 that hasn't been ported over, and the code is difficult to maintain and extend. Lots of code duplication between |
Hmm..., agreed. Thanks. |
I've been eying the guide internals for years... I might rewrite them as part of making the new bin guide... |
A popular rule of thumb is Sturges's rule, i.e. round base-2 log of sample size plus 1. Other rules are listed here. The Freedman-Diaconis rule may be worth looking into. But for simplicity, Sturges's rule or 10 bins can hardly be beat. |
I've gotten the scale to work nicely with uneven bin sizes (point 3 above): df <- data.frame(x = rnorm(1e4))
ggplot(df) +
geom_bar(aes(x)) +
scale_x_binned(breaks = c(-2, -1, 1, 2)) limits will control the scale range of the bins. Default ggplot(df) +
geom_bar(aes(x)) +
scale_x_binned(limits = c(-1.5, 1.5)) as can be seen, there is still some weird interplay between the back transformation and the expansion - I'll look into that of course |
@ptoche I don't think Sturge's rule is not appropriate because it is motivated by minimising some mathematical quantity that is not directly related to needs of a visualisation. I'd recommend using 30 bins to match |
Hmm... I think 30 may be too much as a default as it would clutter the axes with labels |
Hmmmm, in that case maybe it's better to behave like the default labels for continuous legends? i.e. pick |
I'll look into that... that would give some sort of consistency |
hmm... it's a shame that the current trans implementation doesn't allow for modifying the number of breaks after creation a |
We could set |
Just a minor comment: I think it makes sense to have a default bin number of 30 for position scales, but you'd want a default of on the order of five to seven for color scales. And odd numbers have the advantage that they contain the midpoint for diverging scales. Ideally we'd have different defaults for position and color. |
Also, the scale could simply produce empty labels by default if it judges that there are too many bin boundaries. E.g., if there are 30 bin boundaries, leave 20 of the label strings empty. |
I though about this as well... essentially making some of the breaks into minor breaks... problem is if the user chose to have breaks of uneven length and the scale then choose to remove some of the labels - there is no way of deducing where the cut is made in that case... |
I think the colour scales should have a default n_breaks matching the number of discrete colours in the palette or something |
Does it make sense to have a binned guide for anything but colour/fill (same constraints as colourbar)? On one hand binning allows continuous data to be used with aesthetics that only have discrete representation (e.g. shape), but on the other hand I'm not sure when it will ever be a good idea to use something without an inherent order to symbolise different bins. For something like size I cannot figure out why you would want it binned in the first place instead of a direct mapping... |
I think it makes sense for size for the same reason it does for colour: it’s almost certainly easier to perceive differences with a small number of categories. |
that is a fair point... |
I don't think I want automatic arrows TBH |
Maybe |
|
You could also draw a column/row of rectangles, as in @adrfantini's example, and then instead of filling the rectangles with color you place the discrete symbols inside each rectangle. Something like this. library(ggplot2)
df <-data.frame(x = 1:5)
ggplot(df, aes(x = x, y = 1)) +
geom_tile(color = "black", fill = NA, size = 1.5) +
geom_point(aes(color = x), size = 5) +
guides(color = "none") +
ylim(-2, 3) +
theme_void() Created on 2019-09-24 by the reprex package (v0.3.0) |
I don’t really like that look though — too heavy and a strong depart from the look of |
If you want that look you can probably get it by turning off the axis and giving the key background a border. I’ll have to check though |
…tries and make docs for new entities
@hadley I consider this done now. Open questions are the two unresolved comments. Can I get you to chime in if you consider them answered and then finish off the review? |
commit b049018 Merge: e1846bc ccf0ee5 Author: Thomas Knecht <[email protected]> Date: Mon Oct 7 12:29:23 2019 +0200 Resolve conflict Merge branch 'Add_position_nudgestack' of https://github.com/ThomasKnecht/ggplot2 into Add_position_nudgestack # Conflicts: # R/position-nudgestack.R commit e1846bc Author: Thomas Knecht <[email protected]> Date: Mon Oct 7 11:58:47 2019 +0200 Add package spezifications commit 5de0449 Author: Thomas Knecht <[email protected]> Date: Mon Oct 7 11:53:06 2019 +0200 Add package spezifications commit d9ec752 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit e0368b0 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 08:51:55 2019 +0200 Resolve conflict commit 325456a Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit 3210061 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit 739ac7c Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit 662a5da Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:12 2019 +0200 Add validated svg for position_nudgestack commit 598b786 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit 90d1257 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit 415811c Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:44:37 2019 +0200 Add news commit 6e4398c Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit b61211d Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit 369a34b Author: Thomas Knecht <[email protected]> Date: Mon Sep 30 14:06:24 2019 +0200 Use tsbox for converting ts object to tibble commit e4e7ee0 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 08:51:55 2019 +0200 Resolve conflict commit 4d66dad Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit 1b61750 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit 65e72fb Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit e5d61b5 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:06:00 2019 +0200 Adjust filter criterion in examples commit 8848fd9 Author: Thomas Knecht <[email protected]> Date: Mon Sep 30 14:06:24 2019 +0200 Use tsbox for converting ts object to tibble commit 28640d5 Author: Thomas Knecht <[email protected]> Date: Fri Sep 27 15:58:51 2019 +0200 Bugfix commit 59bc2a0 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:00:28 2019 +0200 Add position-nudgestack.R into man commit 71d567b Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit 3a1c71f Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit f26bb90 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:12 2019 +0200 Add validated svg for position_nudgestack commit 3ba06ab Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit fbf28dc Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit 5270a9d Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:20 2019 +0200 Delete packages from @examples commit 32d2203 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:06:00 2019 +0200 Adjust filter criterion in examples commit fc6ba5a Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit b1bb9d1 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:00:28 2019 +0200 Add position-nudgestack.R into man commit d1c7ad8 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:58:38 2019 +0200 Add new position_nudgestack into NAMESPACE commit 621730d Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:56:35 2019 +0200 Add new position to DESCRIPTION commit 0750e55 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit ce942ac Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:26:32 2019 +0200 Delete emtpy rows commit 86dfea0 Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:09:06 2019 +0200 Add position_nudgestack commit ccf0ee5 Author: Thomas Knecht <[email protected]> Date: Mon Oct 7 11:58:47 2019 +0200 Add package spezifications commit 831d569 Author: Thomas Knecht <[email protected]> Date: Mon Oct 7 11:53:06 2019 +0200 Add package spezifications commit af4abb5 Merge: 0a89016 0ff81cb Author: Thomas Knecht <[email protected]> Date: Wed Oct 2 16:37:11 2019 +0200 Resolve conflict Merge branch 'Add_position_nudgestack' of https://github.com/ThomasKnecht/ggplot2 into Add_position_nudgestack # Conflicts: # R/position-nudgestack.R commit 0a89016 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:44:37 2019 +0200 Add news commit 083454a Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit 9cdcf6a Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit 7d23e89 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 08:51:55 2019 +0200 Resolve conflict commit 99eab52 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit 5fa6969 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit 8642839 Author: Thomas Knecht <[email protected]> Date: Mon Sep 30 14:06:24 2019 +0200 Use tsbox for converting ts object to tibble commit f891dbc Author: Thomas Knecht <[email protected]> Date: Fri Sep 27 15:58:51 2019 +0200 Bugfix commit a960ca8 Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit 5b89b32 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:12 2019 +0200 Add validated svg for position_nudgestack commit 37f1bd6 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit e392ac8 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit d443b80 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:20 2019 +0200 Delete packages from @examples commit d967b8e Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:06:00 2019 +0200 Adjust filter criterion in examples commit b1c8b1a Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit 55602af Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:00:28 2019 +0200 Add position-nudgestack.R into man commit 9f6aa7d Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:58:38 2019 +0200 Add new position_nudgestack into NAMESPACE commit 1b7c4c0 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:56:35 2019 +0200 Add new position to DESCRIPTION commit 6d76c3a Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit f67ae70 Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:26:32 2019 +0200 Delete emtpy rows commit 14fd33d Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:09:06 2019 +0200 Add position_nudgestack commit 0ff81cb Merge: 7214587 10fa001 Author: Thomas Knecht <[email protected]> Date: Wed Oct 2 13:46:28 2019 +0200 Merge remote-tracking branch 'upstream/master' into Add_position_nudgestack commit 10fa001 Author: Thomas Lin Pedersen <[email protected]> Date: Tue Oct 1 11:12:59 2019 +0200 Removing direction constraint from geoms (tidyverse#3506) commit 88c5bde Author: Mine Cetinkaya-Rundel <[email protected]> Date: Tue Oct 1 09:32:08 2019 +0100 Minor updates to data docs (tidyverse#3545) commit 7214587 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:44:37 2019 +0200 Add news commit 28ba9bf Merge: daeb34e e688944 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:32:12 2019 +0200 Merge branch 'Add_position_nudgestack' of https://github.com/ThomasKnecht/ggplot2 into Add_position_nudgestack commit daeb34e Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit e688944 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit 9a45cc8 Author: Thomas Lin Pedersen <[email protected]> Date: Tue Oct 1 09:03:07 2019 +0200 scale_binned (tidyverse#3096) commit 02a038e Merge: 88f4a63 bde6844 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:01:10 2019 +0200 Resolve conflict Merge branch 'Add_position_nudgestack' of https://github.com/ThomasKnecht/ggplot2 into Add_position_nudgestack # Conflicts: # R/position-nudgestack.R commit 88f4a63 Author: Thomas Knecht <[email protected]> Date: Mon Sep 30 14:06:24 2019 +0200 Use tsbox for converting ts object to tibble commit 752e476 Author: Thomas Knecht <[email protected]> Date: Fri Sep 27 15:58:51 2019 +0200 Bugfix commit 5271987 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 08:51:55 2019 +0200 Resolve conflict commit 771918d Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit da1e7be Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:37 2019 +0200 Delete packages from example commit a1573b3 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:12 2019 +0200 Add validated svg for position_nudgestack commit 59d2b6e Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:50 2019 +0200 Update vdiffr version commit 0e80c8a Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit 31cc104 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit dc6b78d Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:20 2019 +0200 Delete packages from @examples commit d35ea70 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:06:00 2019 +0200 Adjust filter criterion in examples commit 87c00fa Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit f587fb8 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:01:48 2019 +0200 Add description of position_nudgestack commit 327a6cd Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:01:13 2019 +0200 Add position_nudgestack into description commit c97d54d Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:00:28 2019 +0200 Add position-nudgestack.R into man commit 7fbc0f7 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:58:38 2019 +0200 Add new position_nudgestack into NAMESPACE commit 9d894a8 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:56:35 2019 +0200 Add new position to DESCRIPTION commit 56e9b3b Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit 4535be6 Author: Mara Alexeev <[email protected]> Date: Tue Sep 3 08:26:07 2019 -0400 Clarify documentation in mpg: very minor (tidyverse#3515) * add helpful explanation of mpg$drv commit c8fa99f Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:26:32 2019 +0200 Delete emtpy rows commit a290bb3 Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:09:06 2019 +0200 Add position_nudgestack commit bde6844 Author: Thomas Knecht <[email protected]> Date: Mon Sep 30 14:06:24 2019 +0200 Use tsbox for converting ts object to tibble commit 0ee259c Author: bernie gray <[email protected]> Date: Mon Sep 30 06:54:57 2019 -0400 default formula argument to NULL in geom_smooth() (tidyverse#3307) commit fa000f7 Author: Dewey Dunnington <[email protected]> Date: Sun Sep 29 18:26:36 2019 -0300 Make position guides customizable (tidyverse#3398, closes tidyverse#3322) * Position guides can now be customized using the new `guide_axis()`, which can be passed to position `scale_*()` functions or via `guides()`. The new axis guide (`guide_axis()`) comes with arguments `check.overlap` (automatic removal of overlapping labels), `angle` (easy rotation of axis labels), and `n.dodge` (dodge labels into multiple rows/columns) * `CoordCartesian` gets new methods to resolve/train the new position guides commit 696fe9d Author: Thomas Knecht <[email protected]> Date: Fri Sep 27 15:58:51 2019 +0200 Bugfix commit b027238 Merge: 10b5e24 c32f856 Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 16:38:27 2019 +0200 Merge branch 'Add_position_nudgestack' of https://github.com/TeddyLeeJones/ggplot2 into Add_position_nudgestack commit 10b5e24 Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit 4fb6996 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:37 2019 +0200 Delete packages from example commit 823c686 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:12 2019 +0200 Add validated svg for position_nudgestack commit e6df407 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:50 2019 +0200 Update vdiffr version commit be91893 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit f44e504 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit 3713420 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:20 2019 +0200 Delete packages from @examples commit 9291957 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:06:00 2019 +0200 Adjust filter criterion in examples commit ef5aef7 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit 42c0fa3 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:01:48 2019 +0200 Add description of position_nudgestack commit 548f313 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:01:13 2019 +0200 Add position_nudgestack into description commit 7bb930c Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:00:28 2019 +0200 Add position-nudgestack.R into man commit 9bd40d6 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:58:38 2019 +0200 Add new position_nudgestack into NAMESPACE commit c5022d3 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:56:35 2019 +0200 Add new position to DESCRIPTION commit 8572437 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit 3d61c3a Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:26:32 2019 +0200 Delete emtpy rows commit 2782c9d Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:09:06 2019 +0200 Add position_nudgestack commit c32f856 Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit d5c58da Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:37 2019 +0200 Delete packages from example commit 015b2e3 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:12 2019 +0200 Add validated svg for position_nudgestack commit 2484f71 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:50 2019 +0200 Update vdiffr version commit e2c1fb6 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit a681f59 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit 02f6be4 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:20 2019 +0200 Delete packages from @examples commit def4755 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:06:00 2019 +0200 Adjust filter criterion in examples commit c1729d1 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit 5ebe5d4 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:01:48 2019 +0200 Add description of position_nudgestack commit 99b4b5e Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:01:13 2019 +0200 Add position_nudgestack into description commit 971b110 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:00:28 2019 +0200 Add position-nudgestack.R into man commit e5e91ea Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:58:38 2019 +0200 Add new position_nudgestack into NAMESPACE commit fedef93 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:56:35 2019 +0200 Add new position to DESCRIPTION commit bcc75a3 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit 23e3241 Author: Mara Alexeev <[email protected]> Date: Tue Sep 3 08:26:07 2019 -0400 Clarify documentation in mpg: very minor (tidyverse#3515) * add helpful explanation of mpg$drv commit 01d7db0 Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:26:32 2019 +0200 Delete emtpy rows commit a486906 Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:09:06 2019 +0200 Add position_nudgestack
commit b049018 Merge: e1846bc ccf0ee5 Author: Thomas Knecht <[email protected]> Date: Mon Oct 7 12:29:23 2019 +0200 Resolve conflict Merge branch 'Add_position_nudgestack' of https://github.com/ThomasKnecht/ggplot2 into Add_position_nudgestack # Conflicts: # R/position-nudgestack.R commit e1846bc Author: Thomas Knecht <[email protected]> Date: Mon Oct 7 11:58:47 2019 +0200 Add package spezifications commit 5de0449 Author: Thomas Knecht <[email protected]> Date: Mon Oct 7 11:53:06 2019 +0200 Add package spezifications commit d9ec752 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit e0368b0 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 08:51:55 2019 +0200 Resolve conflict commit 325456a Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit 3210061 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit 739ac7c Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit 662a5da Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:12 2019 +0200 Add validated svg for position_nudgestack commit 598b786 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit 90d1257 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit 415811c Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:44:37 2019 +0200 Add news commit 6e4398c Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit b61211d Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit 369a34b Author: Thomas Knecht <[email protected]> Date: Mon Sep 30 14:06:24 2019 +0200 Use tsbox for converting ts object to tibble commit e4e7ee0 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 08:51:55 2019 +0200 Resolve conflict commit 4d66dad Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit 1b61750 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit 65e72fb Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit e5d61b5 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:06:00 2019 +0200 Adjust filter criterion in examples commit 8848fd9 Author: Thomas Knecht <[email protected]> Date: Mon Sep 30 14:06:24 2019 +0200 Use tsbox for converting ts object to tibble commit 28640d5 Author: Thomas Knecht <[email protected]> Date: Fri Sep 27 15:58:51 2019 +0200 Bugfix commit 59bc2a0 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:00:28 2019 +0200 Add position-nudgestack.R into man commit 71d567b Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit 3a1c71f Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit f26bb90 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:12 2019 +0200 Add validated svg for position_nudgestack commit 3ba06ab Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit fbf28dc Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit 5270a9d Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:20 2019 +0200 Delete packages from @examples commit 32d2203 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:06:00 2019 +0200 Adjust filter criterion in examples commit fc6ba5a Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit b1bb9d1 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:00:28 2019 +0200 Add position-nudgestack.R into man commit d1c7ad8 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:58:38 2019 +0200 Add new position_nudgestack into NAMESPACE commit 621730d Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:56:35 2019 +0200 Add new position to DESCRIPTION commit 0750e55 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit ce942ac Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:26:32 2019 +0200 Delete emtpy rows commit 86dfea0 Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:09:06 2019 +0200 Add position_nudgestack commit ccf0ee5 Author: Thomas Knecht <[email protected]> Date: Mon Oct 7 11:58:47 2019 +0200 Add package spezifications commit 831d569 Author: Thomas Knecht <[email protected]> Date: Mon Oct 7 11:53:06 2019 +0200 Add package spezifications commit af4abb5 Merge: 0a89016 0ff81cb Author: Thomas Knecht <[email protected]> Date: Wed Oct 2 16:37:11 2019 +0200 Resolve conflict Merge branch 'Add_position_nudgestack' of https://github.com/ThomasKnecht/ggplot2 into Add_position_nudgestack # Conflicts: # R/position-nudgestack.R commit 0a89016 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:44:37 2019 +0200 Add news commit 083454a Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit 9cdcf6a Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit 7d23e89 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 08:51:55 2019 +0200 Resolve conflict commit 99eab52 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit 5fa6969 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit 8642839 Author: Thomas Knecht <[email protected]> Date: Mon Sep 30 14:06:24 2019 +0200 Use tsbox for converting ts object to tibble commit f891dbc Author: Thomas Knecht <[email protected]> Date: Fri Sep 27 15:58:51 2019 +0200 Bugfix commit a960ca8 Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit 5b89b32 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:12 2019 +0200 Add validated svg for position_nudgestack commit 37f1bd6 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit e392ac8 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit d443b80 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:20 2019 +0200 Delete packages from @examples commit d967b8e Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:06:00 2019 +0200 Adjust filter criterion in examples commit b1c8b1a Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit 55602af Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:00:28 2019 +0200 Add position-nudgestack.R into man commit 9f6aa7d Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:58:38 2019 +0200 Add new position_nudgestack into NAMESPACE commit 1b7c4c0 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:56:35 2019 +0200 Add new position to DESCRIPTION commit 6d76c3a Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit f67ae70 Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:26:32 2019 +0200 Delete emtpy rows commit 14fd33d Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:09:06 2019 +0200 Add position_nudgestack commit 0ff81cb Merge: 7214587 10fa001 Author: Thomas Knecht <[email protected]> Date: Wed Oct 2 13:46:28 2019 +0200 Merge remote-tracking branch 'upstream/master' into Add_position_nudgestack commit 10fa001 Author: Thomas Lin Pedersen <[email protected]> Date: Tue Oct 1 11:12:59 2019 +0200 Removing direction constraint from geoms (tidyverse#3506) commit 88c5bde Author: Mine Cetinkaya-Rundel <[email protected]> Date: Tue Oct 1 09:32:08 2019 +0100 Minor updates to data docs (tidyverse#3545) commit 7214587 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:44:37 2019 +0200 Add news commit 28ba9bf Merge: daeb34e e688944 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:32:12 2019 +0200 Merge branch 'Add_position_nudgestack' of https://github.com/ThomasKnecht/ggplot2 into Add_position_nudgestack commit daeb34e Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit e688944 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:20:41 2019 +0200 Style file commit 9a45cc8 Author: Thomas Lin Pedersen <[email protected]> Date: Tue Oct 1 09:03:07 2019 +0200 scale_binned (tidyverse#3096) commit 02a038e Merge: 88f4a63 bde6844 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 09:01:10 2019 +0200 Resolve conflict Merge branch 'Add_position_nudgestack' of https://github.com/ThomasKnecht/ggplot2 into Add_position_nudgestack # Conflicts: # R/position-nudgestack.R commit 88f4a63 Author: Thomas Knecht <[email protected]> Date: Mon Sep 30 14:06:24 2019 +0200 Use tsbox for converting ts object to tibble commit 752e476 Author: Thomas Knecht <[email protected]> Date: Fri Sep 27 15:58:51 2019 +0200 Bugfix commit 5271987 Author: Thomas Knecht <[email protected]> Date: Tue Oct 1 08:51:55 2019 +0200 Resolve conflict commit 771918d Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit da1e7be Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:37 2019 +0200 Delete packages from example commit a1573b3 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:12 2019 +0200 Add validated svg for position_nudgestack commit 59d2b6e Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:50 2019 +0200 Update vdiffr version commit 0e80c8a Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit 31cc104 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit dc6b78d Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:20 2019 +0200 Delete packages from @examples commit d35ea70 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:06:00 2019 +0200 Adjust filter criterion in examples commit 87c00fa Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit f587fb8 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:01:48 2019 +0200 Add description of position_nudgestack commit 327a6cd Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:01:13 2019 +0200 Add position_nudgestack into description commit c97d54d Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:00:28 2019 +0200 Add position-nudgestack.R into man commit 7fbc0f7 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:58:38 2019 +0200 Add new position_nudgestack into NAMESPACE commit 9d894a8 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:56:35 2019 +0200 Add new position to DESCRIPTION commit 56e9b3b Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit 4535be6 Author: Mara Alexeev <[email protected]> Date: Tue Sep 3 08:26:07 2019 -0400 Clarify documentation in mpg: very minor (tidyverse#3515) * add helpful explanation of mpg$drv commit c8fa99f Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:26:32 2019 +0200 Delete emtpy rows commit a290bb3 Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:09:06 2019 +0200 Add position_nudgestack commit bde6844 Author: Thomas Knecht <[email protected]> Date: Mon Sep 30 14:06:24 2019 +0200 Use tsbox for converting ts object to tibble commit 0ee259c Author: bernie gray <[email protected]> Date: Mon Sep 30 06:54:57 2019 -0400 default formula argument to NULL in geom_smooth() (tidyverse#3307) commit fa000f7 Author: Dewey Dunnington <[email protected]> Date: Sun Sep 29 18:26:36 2019 -0300 Make position guides customizable (tidyverse#3398, closes tidyverse#3322) * Position guides can now be customized using the new `guide_axis()`, which can be passed to position `scale_*()` functions or via `guides()`. The new axis guide (`guide_axis()`) comes with arguments `check.overlap` (automatic removal of overlapping labels), `angle` (easy rotation of axis labels), and `n.dodge` (dodge labels into multiple rows/columns) * `CoordCartesian` gets new methods to resolve/train the new position guides commit 696fe9d Author: Thomas Knecht <[email protected]> Date: Fri Sep 27 15:58:51 2019 +0200 Bugfix commit b027238 Merge: 10b5e24 c32f856 Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 16:38:27 2019 +0200 Merge branch 'Add_position_nudgestack' of https://github.com/TeddyLeeJones/ggplot2 into Add_position_nudgestack commit 10b5e24 Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit 4fb6996 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:37 2019 +0200 Delete packages from example commit 823c686 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:12 2019 +0200 Add validated svg for position_nudgestack commit e6df407 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:50 2019 +0200 Update vdiffr version commit be91893 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit f44e504 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit 3713420 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:20 2019 +0200 Delete packages from @examples commit 9291957 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:06:00 2019 +0200 Adjust filter criterion in examples commit ef5aef7 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit 42c0fa3 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:01:48 2019 +0200 Add description of position_nudgestack commit 548f313 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:01:13 2019 +0200 Add position_nudgestack into description commit 7bb930c Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:00:28 2019 +0200 Add position-nudgestack.R into man commit 9bd40d6 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:58:38 2019 +0200 Add new position_nudgestack into NAMESPACE commit c5022d3 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:56:35 2019 +0200 Add new position to DESCRIPTION commit 8572437 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit 3d61c3a Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:26:32 2019 +0200 Delete emtpy rows commit 2782c9d Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:09:06 2019 +0200 Add position_nudgestack commit c32f856 Author: Thomas Knecht <[email protected]> Date: Wed Sep 18 15:55:02 2019 +0200 Add tests for correct nudging and stacking commit d5c58da Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:37 2019 +0200 Delete packages from example commit 015b2e3 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:03:12 2019 +0200 Add validated svg for position_nudgestack commit 2484f71 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:50 2019 +0200 Update vdiffr version commit e2c1fb6 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 18:02:29 2019 +0200 Add test file with a doppelganger-test commit a681f59 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:49 2019 +0200 Add new examples commit 02f6be4 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:09:20 2019 +0200 Delete packages from @examples commit def4755 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 16:06:00 2019 +0200 Adjust filter criterion in examples commit c1729d1 Author: Thomas Knecht <[email protected]> Date: Tue Sep 17 15:39:56 2019 +0200 Add the zoo-package to Suggestions commit 5ebe5d4 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:01:48 2019 +0200 Add description of position_nudgestack commit 99b4b5e Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:01:13 2019 +0200 Add position_nudgestack into description commit 971b110 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 14:00:28 2019 +0200 Add position-nudgestack.R into man commit e5e91ea Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:58:38 2019 +0200 Add new position_nudgestack into NAMESPACE commit fedef93 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:56:35 2019 +0200 Add new position to DESCRIPTION commit bcc75a3 Author: Thomas Knecht <[email protected]> Date: Mon Sep 16 13:47:58 2019 +0200 Add time series example commit 23e3241 Author: Mara Alexeev <[email protected]> Date: Tue Sep 3 08:26:07 2019 -0400 Clarify documentation in mpg: very minor (tidyverse#3515) * add helpful explanation of mpg$drv commit 01d7db0 Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:26:32 2019 +0200 Delete emtpy rows commit a486906 Author: Thomas Knecht <[email protected]> Date: Tue Sep 3 09:09:06 2019 +0200 Add position_nudgestack
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
This PR is created in advance to allow for discussion of a potential new fundamental scale (that is, something at the same level as continuous and discrete). The purpose of scale_binned is to discretise continuous data for use with discrete palettes (e.g. shape or brewer colours), or with geoms expecting discrete positions (e.g.
geom_bar()
)...The main advantage of this setup is that it allows the guides to automatically place ticks at the border between bins, rather than at the middle of each bin - something that has been requested before (e.g. #2673)
Currently the scale work for positions, but the main holdback for the other aesthetics is the creation of a new type of legend that supports the desired output.
as can be seen, the ticks are between the bars which provide a much more intuitive understanding of the range of each bin compared to using
geom_histogram()
where the scale remain continuous and thus has tick marks at "nice" locations from a numerical point of view... For colour scales as desired in #2673 this effect is also of great use.Open questions
scale_colour_brewer()
etc are already taken (for good reasons) — is there a pattern that can be applied to all? The most graceful thing would be to have discrete scales that are used on continuous data be binned automatically, but I don't think this is doable (and the magic might be limiting in other ways)