Git Product home page Git Product logo

Comments (1)

teunbrand avatar teunbrand commented on May 25, 2024

Thanks for the report! This looks like a bug to me.
In particular, I think geom_curve() is not applying remove_missing() as it should.
You can see from the layer data that it has NA endpoints, which {grid} probably doesn't render and throws the error about.

library(ggplot2)

dtc <- data.frame(
  node = c("A","B","C"),
  x_connect = c(60,32,80),
  y_connect = c(39,88,110)
)

ggplot(dtc, aes(x = x_connect, y = y_connect)) + 
  geom_point(size=5)+
  geom_curve(aes(xend = dplyr::lead(x_connect), yend = dplyr::lead(y_connect)))
#> Error in if (any(x1 == x2 & y1 == y2)) stop("end points must not be identical"): missing value where TRUE/FALSE needed

layer_data(i = 2)
#>   xend yend  x   y PANEL group colour linewidth linetype alpha
#> 1   32   88 60  39     1    -1  black       0.5        1    NA
#> 2   80  110 32  88     1    -1  black       0.5        1    NA
#> 3   NA   NA 80 110     1    -1  black       0.5        1    NA

Created on 2024-04-08 with reprex v2.1.0

from ggplot2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.