ggproto objects like those created by enter_fade() or exit_appear() evaluate to enviroments making it impossible to compare two ggproto objects to determine if they are the same (both will be different environments). To get around this, I store the expression used to create the enter/exit arguments so that we can later compare two objects created by anim_options().
And demonstrates usage with the tidyr gather/spread animators. In essence, user-facing functions take an argument `anim_opts = anim_options()` as a last argument (after ... if applicable). These options should be passed through to lower level functions and should be given to `animate_plot()` and `static_plot()`.
This implementation actually doesn't break previous functions, but the join and set families will need to be updated to match.
- Use quasiquotation to get variable names
- Unified documentation
- Use match.arg to guard for correct arguments in type and export
- Removed animate_helpers.R
Adds get_input_text() that can be used to get the literal variable name and make_named_data() that creates a list with the input data frames. This second one is necessary because the inputs may be quosures and we need to get the underlying data frames. Default names are $x and $y.
animate_join() now lives in animate_join.R with the other animate_join_ functions. These all use rlang::enquo() to capture their arguments so that animate_join() can print the variable name in the plot title.
Changed name of set_text_color() to choose_text_color() to avoid confusion with the global option setter functions, e.g. set_text_size(). Updated tests to reflect modified threshold.
Currently only used for setting global text and title font sizes, but can be extended to other options that we may wish to set for more than one plot. For fonts, we now provide `set_font_size()` that can be used to set text and title sizes across all subsequent animations. Includes internal getter functions get_{text|title}_size().
Uses the algorithm mentioned at https://stackoverflow.com/a/3943023/2022615 based on the luminance of the background color to determine black or white text. The threshold favored black text in a way that didn't look good with our plots, so I increased the threshold from 0.179 to 0.333.
- Import packages from tidyverse
- Set global imports in zzzz-package.R
- Import pipe and tidyeval
- Update authors
- Downgrade version to 0.0.1.9000
- Change license to MIT
- TODO: Internal package qualifications still needed, e.g. dplyr::row_numbers()