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

ggtern will not run with the latest ggplot2 #49

Open
Knighty16 opened this issue Jul 5, 2021 · 3 comments
Open

ggtern will not run with the latest ggplot2 #49

Knighty16 opened this issue Jul 5, 2021 · 3 comments

Comments

@Knighty16
Copy link

There seems to be an issue with ggtern running with the new ggplot2. I have tried to load earlier versions of R, ggtern, and ggplot2 but cannot get them working. With the latest versions I get the following error:

Error: geom_point requires the following missing aesthetics: x and y

rlang::last_error()
<error/rlang_error>
geom_point requires the following missing aesthetics: x and y
Backtrace:

  1. (function (x, ...) ...
  2. ggtern:::print.ggplot(x)
  3. ggtern:::ggplot_build.ggplot(x)
  4. ggtern:::by_layer(function(l, d) l$compute_geom_1(d))
  5. ggtern:::f(l = layers[[i]], d = data[[i]])
  6. l$compute_geom_1(d)
  7. ggplot2:::f(..., self = self)
  8. ggplot2:::check_required_aesthetics(...)

rlang::last_trace()
<error/rlang_error>
geom_point requires the following missing aesthetics: x and y
Backtrace:
x

  1. +-(function (x, ...) ...
  2. -ggtern:::print.ggplot(x)
  3. +-ggtern::ggplot_build(x)
  4. -ggtern:::ggplot_build.ggplot(x)
  5. \-ggtern:::by_layer(function(l, d) l$compute_geom_1(d))
    
  6.   \-ggtern:::f(l = layers[[i]], d = data[[i]])
    
  7.     \-l$compute_geom_1(d)
    
  8.       \-ggplot2:::f(..., self = self)
    
  9.         \-ggplot2:::check_required_aesthetics(...)
    
@MichalisOmirou
Copy link

I am facing exactly the same issue while I am trying to correct a plot that I have already generated using previous versions of ggplot2.

packageVersion('ggplot2')
[1] ‘3.3.5’

packageVersion('ggtern')
[1] ‘3.3.0’

The following are appeared:

Error: geom_point requires the following missing aesthetics: x and y
Run rlang::last_error() to see where the error occurred.

rlang::last_error()
<error/rlang_error>
geom_point requires the following missing aesthetics: x and y
Backtrace:

  1. (function (x, ...) ...
  2. ggtern:::print.ggplot(x)
  3. ggtern:::ggplot_build.ggplot(x)
  4. ggtern:::by_layer(function(l, d) l$compute_geom_1(d))
  5. ggtern:::f(l = layers[[i]], d = data[[i]])
  6. l$compute_geom_1(d)
  7. ggplot2:::f(..., self = self)
  8. ggplot2:::check_required_aesthetics(...)

geom_point requires the following missing aesthetics: x and y
Backtrace:

  1. ├─(function (x, ...) ...
  2. └─ggtern:::print.ggplot(x)
  3. ├─ggtern::ggplot_build(x)
  4. └─ggtern:::ggplot_build.ggplot(x)
  5. └─ggtern:::by_layer(function(l, d) l$compute_geom_1(d))
    
  6.   └─ggtern:::f(l = layers[[i]], d = data[[i]])
    
  7.     └─l$compute_geom_1(d)
    
  8.       └─ggplot2:::f(..., self = self)
    
  9.         └─ggplot2:::check_required_aesthetics(...)
    

@loukesio
Copy link

Same error for me

@Knighty16
Copy link
Author

I found the version combinations to get ggtern working again is:

reload:

R 4.0.2
ggplot2: 3.3.2
ggtern: 3.3.0 - ignore the warning...

Kind regards

Knighty16

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

3 participants