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_hilbert_outline(closed = FALSE) identifies endcap incorrectly #31

Open
davidchall opened this issue Jan 12, 2023 · 0 comments
Open
Labels
bug Something isn't working

Comments

@davidchall
Copy link
Owner

Currently, the endcap ("to side") is identified as being opposite the "from side". But this means we're saying the path is traveling in a straight line, which is rarely true for a Hilbert curve. To know the true endcap, we probably need to calculate the next (or previous) square in the path.

This example demonstrates the problem. We've used closed = FALSE, but there are lots of lines blocking the path.

library(ggip)
#> Loading required package: ggplot2
#> Loading required package: ipaddress

ggplot(iana_ipv4) +
  coord_ip() +
  geom_hilbert_outline(aes(ip = network, color = allocation), curve_order = 5, closed = FALSE) +
  theme_ip_light()

Created on 2023-01-12 with reprex v2.0.2

@davidchall davidchall added the bug Something isn't working label Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant