Skip to content

Fix violin plot removal examples to include colour = NA#1026

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-graph-render-bug
Draft

Fix violin plot removal examples to include colour = NA#1026
Copilot wants to merge 2 commits intomainfrom
copilot/fix-graph-render-bug

Conversation

Copy link
Contributor

Copilot AI commented Nov 27, 2025

When hiding violin plots via violin.args = list(width = 0, linewidth = 0), a vertical black line artifact remains visible in PDF/PNG output due to the border color still being drawn.

The function documentation already shows the correct approach with colour = NA, but vignettes and tests were using incomplete arguments.

Changes

  • Vignette (vignettes/web_only/ggbetweenstats.Rmd): Updated two examples to use complete arguments
  • Test (tests/testthat/test-ggbetweenstats.R): Updated "specific geoms removed" test to match

Correct usage

# to remove violin plot completely
violin.args = list(width = 0, linewidth = 0, colour = NA)

Note: The snapshot test will need regeneration as the plot will no longer show the artifact lines.

Original prompt

This section details on the original issue you should resolve

<issue_title>Graph render bug in PDF and PNG</issue_title>
<issue_description>When saving a ggbetweenstats graph to a PDF file through ggsave, if violinplot is removed as indicated in the documentation

# to remove violin plot
violin.args = list(width = 0, linewidth = 0)

a vertical black line appears through the whole range of values.

Image

To solve the issue, it is sufficient to specify the colour parameter to NA

# to remove violin plot
violin.args = list(width = 0, linewidth = 0, colour = NA)

Additionally, if the graph is saved in PNG, the greek character is not rendered properly.

Image</issue_description>

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: IndrajeetPatil <11330453+IndrajeetPatil@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix graph render bug in PDF and PNG outputs Nov 27, 2025
Copilot AI requested a review from IndrajeetPatil November 27, 2025 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants