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

geom_mosaic's alpha clashes with psych's alpha #14

Closed
Rmadillo opened this issue Oct 4, 2017 · 1 comment
Closed

geom_mosaic's alpha clashes with psych's alpha #14

Rmadillo opened this issue Oct 4, 2017 · 1 comment

Comments

@Rmadillo
Copy link

Rmadillo commented Oct 4, 2017

If you have psych loaded (which is now a tidyverse autoload, I believe, via broom), geom_mosaic throws this error:

Error in alpha(data$fill, data$alpha) : 
  Data must either be a data frame or a matrix

Unloading psych dependencies and then unloading psych makes it work, because of the alpha function.

Specifying scales::alpha() in your code should fix this?

draw_panel = function(data, panel_scales, coord) {
 #  cat("draw_panel in GeomMosaic\n")
# browser()
   if (all(is.na(data$colour)))
     data$colour <- scales::alpha(data$fill, data$alpha) # regard alpha in colour determination
@haleyjeppson
Copy link
Owner

Thanks for the suggestion. The change has been made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants