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

scale_binned #3096

Merged
merged 33 commits into from
Oct 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
bda0920
First stab at ScaleBin
thomasp85 Jan 21, 2019
e047a1d
Rename to ScaleBinned
thomasp85 Jan 21, 2019
bd3c989
Add positional scales
thomasp85 Jan 22, 2019
7f0a9f4
Make binned position work with uneven bin sizes
thomasp85 Jan 24, 2019
d06acbe
fix expansion of range
thomasp85 Jan 24, 2019
11aa5e8
Use the same breaks algorithm as continuous scale
thomasp85 Jan 25, 2019
7f1b7f3
Make sure to reset the breaks parent environment
thomasp85 Jan 25, 2019
848bb8c
Merge branch 'master' of https://github.com/tidyverse/ggplot2 into sc…
thomasp85 Jan 25, 2019
e53c122
prepare non-positional binned scales
thomasp85 Jan 30, 2019
316fdeb
make coloursteps guide as shorthand for sensible colourbar settings
thomasp85 Jan 30, 2019
6c5309b
Make colour version of binned scales
thomasp85 Jan 30, 2019
a2630c4
Make sure binned scale works with transforms
thomasp85 Jan 31, 2019
aa0b8ed
Improvements to guide_colorsteps
thomasp85 Jan 31, 2019
ba7c27f
Fix docs
thomasp85 Jan 31, 2019
575c610
begin playing with guide_bin
thomasp85 Jan 31, 2019
c948bcf
Merge branch 'master' of https://github.com/tidyverse/ggplot2 into sc…
thomasp85 Sep 20, 2019
deed973
further work on bin guide
thomasp85 Sep 23, 2019
b7cda3c
Fix argument names to be dot.case
thomasp85 Sep 24, 2019
cb1dab6
Working version of guide_bins
thomasp85 Sep 24, 2019
a7d791f
Fix weird duplication of scale constructors
thomasp85 Sep 24, 2019
61ced3f
remove atrociousness
thomasp85 Sep 24, 2019
795fa12
Fixes based on feedback from @hadley
thomasp85 Sep 25, 2019
79e223e
finalize guide_bins
thomasp85 Sep 25, 2019
12faceb
Implement rescaler for binned scales
thomasp85 Sep 25, 2019
7316e6f
Fix merging of guide_bins
thomasp85 Sep 25, 2019
99b96e2
Binned versions of all relevant scales
thomasp85 Sep 25, 2019
267095f
fix blender scales to work with rescaler fix
thomasp85 Sep 25, 2019
5299fa9
update position scales to work properly with the new ViewScale setup
thomasp85 Sep 25, 2019
fd394e4
Improve structure. Add binning scale documentation to all relevant en…
thomasp85 Sep 26, 2019
4fef5ba
Fixing all check warnings
thomasp85 Sep 26, 2019
fdae520
Add tests for new guides
thomasp85 Sep 26, 2019
9039d6b
Rename blender -> fermenter
thomasp85 Sep 30, 2019
aed1945
Merge branch 'master' of https://github.com/tidyverse/ggplot2 into sc…
thomasp85 Sep 30, 2019
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
4 changes: 4 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ Collate:
'grob-dotstack.r'
'grob-null.r'
'grouping.r'
'guide-bins.R'
'guide-colorbar.r'
'guide-colorsteps.R'
'guide-legend.r'
'guides-.r'
'guides-axis.r'
Expand Down Expand Up @@ -186,6 +188,7 @@ Collate:
'save.r'
'scale-.r'
'scale-alpha.r'
'scale-binned.R'
'scale-brewer.r'
'scale-colour.r'
'scale-continuous.r'
Expand All @@ -200,6 +203,7 @@ Collate:
'scale-manual.r'
'scale-shape.r'
'scale-size.r'
'scale-steps.R'
'scale-type.R'
'scale-view.r'
'scale-viridis.r'
Expand Down
33 changes: 33 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,24 @@ S3method(grobWidth,zeroGrob)
S3method(grobX,absoluteGrob)
S3method(grobY,absoluteGrob)
S3method(guide_gengrob,axis)
S3method(guide_gengrob,bins)
S3method(guide_gengrob,colorbar)
S3method(guide_gengrob,guide_none)
S3method(guide_gengrob,legend)
S3method(guide_geom,axis)
S3method(guide_geom,bins)
S3method(guide_geom,colorbar)
S3method(guide_geom,guide_none)
S3method(guide_geom,legend)
S3method(guide_merge,axis)
S3method(guide_merge,bins)
S3method(guide_merge,colorbar)
S3method(guide_merge,guide_none)
S3method(guide_merge,legend)
S3method(guide_train,axis)
S3method(guide_train,bins)
S3method(guide_train,colorbar)
S3method(guide_train,colorsteps)
S3method(guide_train,guide_none)
S3method(guide_train,legend)
S3method(guide_transform,axis)
Expand Down Expand Up @@ -201,6 +206,8 @@ export(PositionJitterdodge)
export(PositionNudge)
export(PositionStack)
export(Scale)
export(ScaleBinned)
export(ScaleBinnedPosition)
export(ScaleContinuous)
export(ScaleContinuousDate)
export(ScaleContinuousDatetime)
Expand Down Expand Up @@ -370,8 +377,11 @@ export(ggproto_parent)
export(ggsave)
export(ggtitle)
export(guide_axis)
export(guide_bins)
export(guide_colorbar)
export(guide_colorsteps)
export(guide_colourbar)
export(guide_coloursteps)
export(guide_gengrob)
export(guide_geom)
export(guide_legend)
Expand Down Expand Up @@ -438,12 +448,14 @@ export(scale_alpha_discrete)
export(scale_alpha_identity)
export(scale_alpha_manual)
export(scale_alpha_ordinal)
export(scale_color_binned)
export(scale_color_brewer)
export(scale_color_continuous)
export(scale_color_date)
export(scale_color_datetime)
export(scale_color_discrete)
export(scale_color_distiller)
export(scale_color_fermenter)
export(scale_color_gradient)
export(scale_color_gradient2)
export(scale_color_gradientn)
Expand All @@ -452,14 +464,19 @@ export(scale_color_hue)
export(scale_color_identity)
export(scale_color_manual)
export(scale_color_ordinal)
export(scale_color_steps)
export(scale_color_steps2)
export(scale_color_stepsn)
export(scale_color_viridis_c)
export(scale_color_viridis_d)
export(scale_colour_binned)
export(scale_colour_brewer)
export(scale_colour_continuous)
export(scale_colour_date)
export(scale_colour_datetime)
export(scale_colour_discrete)
export(scale_colour_distiller)
export(scale_colour_fermenter)
export(scale_colour_gradient)
export(scale_colour_gradient2)
export(scale_colour_gradientn)
Expand All @@ -468,17 +485,23 @@ export(scale_colour_hue)
export(scale_colour_identity)
export(scale_colour_manual)
export(scale_colour_ordinal)
export(scale_colour_steps)
export(scale_colour_steps2)
export(scale_colour_stepsn)
export(scale_colour_viridis_b)
export(scale_colour_viridis_c)
export(scale_colour_viridis_d)
export(scale_continuous_identity)
export(scale_discrete_identity)
export(scale_discrete_manual)
export(scale_fill_binned)
export(scale_fill_brewer)
export(scale_fill_continuous)
export(scale_fill_date)
export(scale_fill_datetime)
export(scale_fill_discrete)
export(scale_fill_distiller)
export(scale_fill_fermenter)
export(scale_fill_gradient)
export(scale_fill_gradient2)
export(scale_fill_gradientn)
Expand All @@ -487,22 +510,30 @@ export(scale_fill_hue)
export(scale_fill_identity)
export(scale_fill_manual)
export(scale_fill_ordinal)
export(scale_fill_steps)
export(scale_fill_steps2)
export(scale_fill_stepsn)
export(scale_fill_viridis_b)
export(scale_fill_viridis_c)
export(scale_fill_viridis_d)
export(scale_linetype)
export(scale_linetype_binned)
export(scale_linetype_continuous)
export(scale_linetype_discrete)
export(scale_linetype_identity)
export(scale_linetype_manual)
export(scale_radius)
export(scale_shape)
export(scale_shape_binned)
export(scale_shape_continuous)
export(scale_shape_discrete)
export(scale_shape_identity)
export(scale_shape_manual)
export(scale_shape_ordinal)
export(scale_size)
export(scale_size_area)
export(scale_size_binned)
export(scale_size_binned_area)
export(scale_size_continuous)
export(scale_size_date)
export(scale_size_datetime)
Expand All @@ -511,6 +542,7 @@ export(scale_size_identity)
export(scale_size_manual)
export(scale_size_ordinal)
export(scale_type)
export(scale_x_binned)
export(scale_x_continuous)
export(scale_x_date)
export(scale_x_datetime)
Expand All @@ -519,6 +551,7 @@ export(scale_x_log10)
export(scale_x_reverse)
export(scale_x_sqrt)
export(scale_x_time)
export(scale_y_binned)
export(scale_y_continuous)
export(scale_y_date)
export(scale_y_datetime)
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ggplot2 (development version)

* A new scale type has been added, that allows binning of aesthetics at the
scale level. It has versions for both position and non-position aesthetics and
comes with two new guides (`guide_bins` and `guide_coloursteps`) (@thomasp85, #3096)

* 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
Expand Down
Loading