Skip to content

Add alpha parameter to age_scatter for configurable point transparency#501

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/modify-age-scatter-alpha
Draft

Add alpha parameter to age_scatter for configurable point transparency#501
Copilot wants to merge 2 commits intomainfrom
copilot/modify-age-scatter-alpha

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 28, 2026

  • The title of your PR should briefly describe the change.
  • Commit/merge messages to be included in NEWS.md should begin with -.
  • Code should follow the tidyverse style guide.
  • Documentation should use roxygen2, with Markdown syntax.
  • Contributions should include unit tests (using testthat).

Description

Adds configurable point transparency to age_scatter() plots. Previously hardcoded at 0.7.

Changes

Function signatures:

  • age_scatter(): Added alpha = 0.7 parameter
  • autoplot.pop_data(): Added alpha = 0.7 parameter, passes through to age_scatter()

Documentation:

  • Updated roxygen2 docs with parameter description and usage example

Tests:

  • Added test verifying alpha parameter accepts custom values

Usage

# Default behavior unchanged
xs_data |> autoplot(type = "age-scatter")

# Custom transparency
xs_data |> autoplot(type = "age-scatter", alpha = 0.3)

For more information see Contributing.

Original prompt

This section details on the original issue you should resolve

<issue_title>modify the age scatter function to allow users to change the point alpha</issue_title>
<issue_description>age_scatter <- function(
object,
strata = NULL,
alpha = 0.7, # Add alpha as a parameter
age_var = object |> get_age_var(),
value_var = object |> get_values_var()) {

create default plotting

</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: kaiemjoy <16113030+kaiemjoy@users.noreply.github.com>
Copilot AI changed the title [WIP] Modify age scatter function to allow users to change point alpha Add alpha parameter to age_scatter for configurable point transparency Jan 28, 2026
Copilot AI requested a review from kaiemjoy January 28, 2026 21:33
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.

modify the age scatter function to allow users to change the point alpha

2 participants