Skip to content

Geom spidergram#40

Merged
Abagna123 merged 18 commits into
mainfrom
geom-spidergram
Jun 16, 2026
Merged

Geom spidergram#40
Abagna123 merged 18 commits into
mainfrom
geom-spidergram

Conversation

@Abagna123

Copy link
Copy Markdown
Collaborator

No description provided.

@Abagna123

Copy link
Copy Markdown
Collaborator Author

Hi Thomas,

I just added the initial version of geom_spider and the GeomSpider ggproto for spider plots. It’s currently not working. I tried but could not fix. I get this error when trying to plot:

Error in geom_spider():
! Problem while setting up geom.
Caused by error in setup_data():
! Elements not found in data: "La", "Ce", and "Nd"
Available columns: "PANEL" and "group"

Example usage

df <- data.frame(
Sample = c("A","B"),
La = c(10,5),
Ce = c(20,8),
Nd = c(15,6)
)

ggplot() +
geom_spider(
data = df,
elements = c("La","Ce","Nd"),
sample_id = "Sample"
) +
scale_x_continuous(
breaks = 1:3,
labels = c("La","Ce","Nd")
) +
scale_y_log10()

@archaeothommy

Copy link
Copy Markdown
Owner

Feedback from maintainer meeting about data input:

  • wide/ASTR format as default
  • handler for long format as separate function because this will also concern other geoms.

archaeothommy and others added 9 commits April 7, 2026 08:36
Merge branch 'main' into geom-spidergram

# Conflicts:
#	NAMESPACE
#	R/data.R
#	R/zzz.R
#	man/ASTR-package.Rd
#	man/ASTR.Rd
* implements how geom handles wide format as intended
Merge branch 'main' into geom-spidergram
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
@archaeothommy

Copy link
Copy Markdown
Owner

@Abagna123 I checked your code and it requires some more work. Most importantly, everything should be handled in the Geom definition to allow its use with other `geom_...()" functions. And the elements to be plotted should be supplied as an aesthetic.

Is there a reason for including na.rm? From the current code, it doesn't seem like it does anything.

@Abagna123 Abagna123 merged commit 8b127c1 into main Jun 16, 2026
1 of 4 checks passed
@Abagna123

Copy link
Copy Markdown
Collaborator Author

@archaeothommy yes,the na.rm parameter was never used. so i will simply remove it.

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.

2 participants