Skip to content

Conversation

@JacobBumgarner
Copy link

@JacobBumgarner JacobBumgarner commented Nov 4, 2025

This PR fixes #6725

The bug was that if a lambda was passed into the alt parameter of labs, the plot could not actually be rendered. However, if the plot was simply crafted but not built, the alt text function would work as expected, allowing the user to reference plot attributes.

Specifically, the bug was located in setup_plot_labels. An lapply in the function passed in labels, whereas the get_alt_text function passed in the plot.

This is small PR that copies the get_alt_text behavior into setup_plot_labels, and isolates alt text behavior from the non aesthetic and title parameters.

Copy link
Collaborator

@teunbrand teunbrand left a comment

Choose a reason for hiding this comment

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

Thank you for the PR! Can I get you to write a small unit test that the alt lambda is handled succesfully?

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.

lambdas in alt text have unexpected and likely incorrect behavior

2 participants