Skip to content

Conversation

teunbrand
Copy link
Collaborator

@teunbrand teunbrand commented Dec 17, 2024

This PR aims to fix #6248.

It does the following:

  • New element_point() and element_polygon() elements.
  • New theme(point, polygon) arguments.
  • Gave sensible defaults for these theme settings.

It does not do the following:

  • Use these new elements in any meaningful way

@Yunuuuu
Copy link
Contributor

Yunuuuu commented Dec 18, 2024

I also require the element_polygon feature and have implemented it in my ggalign package to allows user to define links between two plots, as illustrated in the following figure (the blue and red polygons between the plots). I believe it would be more user-friendly if we could expose the alpha argument in element_polygon (and potentially in element_rect() as well).

image

@teunbrand
Copy link
Collaborator Author

Good to know I'm not the only one with this need :) I think exposing elements to alpha is a related but separate discussion that merits its own issue.

Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Merge branch 'main' into element_polygon_point

# Conflicts:
#	R/theme-elements.R
@teunbrand teunbrand merged commit df0e150 into tidyverse:main Jan 28, 2025
13 checks passed
@teunbrand teunbrand deleted the element_polygon_point branch January 28, 2025 13:20
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

Successfully merging this pull request may close these issues.

Feature request: elements for other graphical primitives

3 participants