KLH
KLH

Reputation: 11

How can I use geom_segment with ggtern?

I am trying to generate a ternary plot with arrows showing the shift in composition from time period 1 to time period 2. I know you can do this in ggplot using geom_segment, which the ggtern website lists it as an approved geometry.

When I try to run it, however, I get the error Ignoring unknown aesthetics: z and zend. Is this an issue with the package, and is there a workaround?

ggtern(df) +
  geom_segment(aes(x = v1_t1, xend = v1_t2, y = v2_t1, yend = v2_t2, z = v3_t1, zend= v3_t2), arrow = arrow())

Upvotes: 1

Views: 78

Answers (0)

Related Questions