-
Fix style and documentation for stat_qq_line and geom_qq_line
This commit was signed with a verified signature.karawoo Kara Woo
GPG key ID: 500F98502D6E9958 Learn about signing commits -
Fix data frame creation in StatQqLine's compute_group
karawoo committedAug 1, 2017 This commit was signed with a verified signature.karawoo Kara Woo
GPG key ID: 500F98502D6E9958 Learn about signing commits -
Add stat for easily finding slope and intercept of Q-Q line (#2097)
* Make stat for Q-Q lines * Added stat_qq_line to NEWS.md * use geom_path and add params * fix parameters * wrap line in NEWS.md * Use tidyverse style * add fullrange parameter * fix news * reduce code dupication * combine stat_qq and stat_qq_line docs * Update stat_qq_line and stat_qq documentation * newline at end of DESCRIPTION
-
Add string options for `ggsave()` (#2217)
Fixes #2156
-
Add `reverse` argument to `position_dodge2()` (#2226)
* Add reverse parameter to position_dodge2 * Add line to NEWS.md
-
New dodging algorithm for box plots and bars (#2196)
* New position calculations for box plots * Update documentation * Add test to ensure that variable width boxes don't overlap * Don't warn about overlapping intervals for box plots * Scale boxes all at once, rather than by group This is still wrong though * Scale boxes across all the data based on the max number that need to be dodged from one another i.e. if there are 2 boxes per group all widths get divided by 2 * Dodge boxes when there's a truly continuous x * Make sure boxes are ordered consistently * Don't overwrite the n argument passed to pos_boxdodge * Ensure proper behavior when `preserve = "total"`. * Modify test for overlapping boxes * Add padding between boxes that occupy the same position * Add note to NEWS.md * Remove print statement in test
😳 * Indent code in examples * Replace rowMeans with (df$xmin + df$xmax) / 2 * Replace plyr code * Find overlapping groups with a for loop * Change padding to 0.05 * Modifications that make pos_boxdodge work with geom_rect * Make sure elements are placed at the correct x location Fixes issue where boxes on a continuous x scale were placed at 1, 2, etc. no matter what the original x values were * "boxes" -> "elements" since this is no longer only used for boxes * Add bar examples to position_boxdodge documentation * Ordering in collide_box needs to be the reverse of what it was to match legend * PositionBoxdodge should use find_x_overlaps to find n when x is missing * Drop extra computed columns when they're no longer needed * Fix bug that was subtly flipping boxes horizontally This is why the `reverse` logic was messed up, so it can now go back to the way it was. * Add tests for position_boxdodge * Rename position_boxdodge to position_dodge2 * Update geom-bar documentation to mention position_dodge2() * Don't dodge if current xmin is *equal* to previous xmax * Set default padding to 0 for position_dodge2, but override for boxes * Change default box plot padding back to 0.1 * Update position_dodge2 documentation * collide_box() does need to reorder the differently than collide() in order to match the legend order * Rename collide_box() to collide2() to match position_dodge2() * Return to default padding of 0.1 for position_dodge2() * Document position_dodge2 together with position_dodge * Add description of position_dodge2 to NEWS.md * Revert the order of `preserve` arguments for dodge2 * Update dodge examples * Add stats:: before aggregate() -
Add fortify method for tbls (#2225)
* Add fortify method for tbls (closes #2218) * Add line to NEWS.md * tbl_df -> tbl
karawoo committed on GitHubJul 28, 2017 Some checks were not successful
2 failing and 2 successful checks -
This commit was signed with a verified signature.
karawoo Kara Woo
GPG key ID: 500F98502D6E9958 Learn about signing commits -
Add `breaks` parameter in `StatSummaryBin` (#2223)
* Add breaks parameter to StatSummaryBin * Add line to NEWS.md * Add bins, binwidth, and breaks as args to stat_summary_bin
-
This commit was signed with a verified signature.
karawoo Kara Woo
GPG key ID: 500F98502D6E9958 Learn about signing commits -
fix various geom_sf related issues (#2216)
* addresses #2119 * tidy graticule fixes * ggplot2 side of issue r-spatial/sf#396 * tabs -> spaces * add ndiscr to docs * fix #2200 * attempt to fix #2060 All cases were in sf.R a geometry column is address with x$geometry, ggplot2 made the wrong assumption that the geometry column has a fixed name. I replaced this in certain instances, where the data are already pretty transformed and no longer have properties of sf objects, with a fixed position, i.e. x[[1]], which seems to work. * fixes r-spatial/sf#438 * address review comments * fix break on geom_raster, objects without list-column see https://gist.github.com/mdsumner/573ec70014df177baa2d1df7e55e1943 for the case that this PR fixes * tidy up * trying @karawoo's suggestion * adds some sf tests * tidy further
-
* position_jitter() gains seed argument * use only one with_seed() call * use mode = 'integer' * actually set seed * fixed seed by default * NEWS * support seed = NA, which is now the default in this mode, the random seed is not changed, but reset after processing * with_seed() always initializes RNG * added example * extract function * fix and clarify example * NA picks a random seed using sample.int() * extract with_preserve_seed() * extract function * use withr * move entry to NEWS.md * add withr as remote
-
Minor spelling fix in docs (#2220)
s/across a the levels/across the levels/
-
Add warning for coord_trans() when resulting x/y value becomes non-fi…
…nite (#2147) (#2210) * `coord_trans()` now generates a warning when a transformation results in x or y values being non-finite (#2147). * Add NEWS.md item for new `coord_trans()` warning.
-
Add spacing around legend titles (#2215)
* Add spacing around text elements, especially legend titles * Add bullet to NEWS.md
-
Make `debug = TRUE` work when `expand_x` and `expand_y` are FALSE (#2212
) * Make `debug = TRUE` work when `expand_x` and `expand_y` are FALSE * Fix debug logic to deal with NULLs * Use isTRUE()
karawoo committed on GitHubJul 19, 2017 Some checks were not successful
1 failing and 3 successful checks
-
Improve scales behavior for ordered factors (#2179)
* Add scale_size_ordinal * Add scale_shape_ordinal, which throws a warning when mapping shape to an ordered factor * Warn when using alpha for factors (but not ordered factors) * Add a line to NEWS.md * DRY up alpha, shape, and size * Add tests for size/alpha/shape behavior with factors * Use viridis as default for ordered factors * Move viridisLite to Imports
-
Fixes name of compute panel function. (#2209)
Also cleans up comments/text copied over from above test.
-
This commit was signed with a verified signature.
karawoo Kara Woo
GPG key ID: 500F98502D6E9958 Learn about signing commits -
show.legend now handles named logical vectors (#2027)
* add support for vectors in show.legend * fix behavior and add tests * fix code after review * update documentation and style * fix NEWS.md
-
Add built-in support for viridis color scales (#2178)
* Begin viridis scales * Add to NEWS.md * Add documentation for continuous_scale parameters na.value and guide * Remove @description * tidyverse style for long calls to discrete_scale/continuous_scale oops * Use markdown url syntax * viridis_pal is now in the scales package * Shorten names to viridis_c and viridis_d * Add viridis examples based on the brewer examples * Add viridis tests * Update viridis tests * Use global options to control default continuous colour/fill scales * Don't set options in .onLoad() * Put closing paren on new line * Update NEWS.md
karawoo committed on GitHubJul 13, 2017 Some checks were not successful
2 failing and 2 successful checks
-
Remove include.lowest parameter from cut_interval docs. Closes #2197
This commit was signed with a verified signature.karawoo Kara Woo
GPG key ID: 500F98502D6E9958 Learn about signing commits
-
Allow separate expansion values for lower and upper range limits (v2) (…
…#1805) * Allow separate expansion values for lower and upper range limits. The `expand` argument for `scale_*_continuous()` and `scale_*_discrete()` now accepts separate expansion constants for the lower and upper range limits. This is useful for creating bar charts where the bottom of the bars are flush with the x axis but the bars still have some (automatically calculated amount of) space above them: ```R ggplot(mtcars) + geom_bar(aes(x = factor(cyl))) + scale_y_continuous(expand = c(0, 0, 0.1, 0)) ``` It can also be useful for line charts, e.g. for counts over time, where one wants to have a ’hard’ lower limit of y = 0, but leave the upper limit unspecified (and perhaps differing between panels), but with some extra space above the highest point on the line. (With symmetrical limits, the extra space above the highest point could cause the lower limit to be negative.) The syntax for the multiplicative and additive expansion constants has been changed from `c(m, a)` to `c(m_lower, a_lower, m_uppper, a_upper)`. The old syntax will still work, as length 2 vectors `c(m, a)` are expanded to `c(m, a, m, a)` and length 3 vectors are expanded from `c(m1, a1, m2)` to `c(m1, a2, m2, a1)`. (@huftis, #1669) * Added `expand_scale()` function for easier generation of scale expansion vectors. Instead of having to manually specify an `expand` argument using a somewhat confusing syntax (a vector of 2, 3 or 4 numeric values), it’s now possible to use the user-friendly (and documented) `expand_scale()` function. This commit also cleans up the documentation related to the `expand` argument, which was duplicated in several functions. * Added UTF-8 character encoding declaration to DESCRIPTION. The documentation for one of the functions had a no-breaking space, (between a number and the word ‘units’), which caused R CMD check to complain about ‘non-ASCII input and no declared encoding’. This adds a character encoding declaration of UTF-8 to the DESCRIPTION file to fix this problem. * Fixed some style issues. * Updated and regenerated documentation. * Specify character encoding used for documentation. * Minor grammar improvement in documentation. * Don’t generate documentation for internal function expand_range4().
-
Improve datetime scales (#2186)
* Rewrite scale_datetime and update position/size/alpha scales * Fix style for scale_(x|y)_(date|datetime) * Update fill and colour scales for datetimes * Add to NEWS.md * Test new datetime alpha/size/colour scales * Test should use scale_colour_datetime, not scale_colour_gradient
karawoo committed on GitHubJul 7, 2017 Some checks were not successful
2 failing and 2 successful checks
-
Add room around guide title (#2195)
* Add room around guide title (@baptiste) * Update visual test SVGs * Update hgap and vgap in guide-colorbar.r to match guide-legend.r * New visual test SVGs to reflect modified legends in guide-colorbar.r
-
This commit was signed with a verified signature.
karawoo Kara Woo
GPG key ID: 500F98502D6E9958 Learn about signing commits -
-
[Minor] typo in extending-ggplot2 vignette (#2193)
build -> built
-
Add top and right theme settings to axis.ticks and axis.line (#2094)
* Add top and right theme settings to axis.ticks and axis.line * add left and bottom identifiers to all axis elements * Correctly reference the new bottom and left theme elements * Add visual test * Undo change to vdiffr version
-
This commit was signed with a verified signature.
karawoo Kara Woo
GPG key ID: 500F98502D6E9958 Learn about signing commits -
Add note recommending annotate (#2113)
Add note to documentation explaining differing behaviour of geom_text, and annotate(geom = "text").
-
Keep element subclasses when adding (#2063)
* Use child element as base when merging theme elements * Add the correct element * Add merge_element generic and methods for all base classes * Check for direct inheritance * Add unit tests * Update news * Update roxygen * Only display most specific class in error message * dispatch on element class * Reformat line * More code formatting
-
Add base_line_size and base_rect_size parameters to theme defaults (#…
…2190) * Add base_line_size and base_rect_size parameters to theme defaults * Add tests for larger base_size values * Add line to NEWS.md * Set default base_(line|rect)_size in function definition