Skip to content

fix plot warning (#7)#8

Open
ahrensmaike wants to merge 1 commit into
devfrom
fix-plot-warning
Open

fix plot warning (#7)#8
ahrensmaike wants to merge 1 commit into
devfrom
fix-plot-warning

Conversation

@ahrensmaike

@ahrensmaike ahrensmaike commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

This PR aims at eliminating the warning about coloring stable variable names in red and improving the test suite for the plot.
For more recent ggplot2 version, this is done using {ggtext} package, for older ones (pre 2024) color highlighting is replaced by highlighting variables with "*" (with a message). PR adds a snapshot for easier tracking and reviewing plot changes.
Details are as follows:

Plotting

  • The plot.variable.selections function now provides improved clustered heatmaps with colored variable labels (using ggtext::element_markdown()) to highlight stable selections in red for ggplot2 >= 3.5.0, and falls back to asterisk-marked labels for older versions. The plotting logic is more robust, extended input validation and additional messages.
  • Added new global variables (draw_plot, variable_colored_label) to prevent R CMD check warnings.

Testing

  • Added a test fixture generator script (tests/testthat/fixtures/create_test_data.R) for reproducible and deterministic test data to speed up tests (currently not used, let's discuss)
  • Expanded tests for plot.variable.selections, including checks for errors on invalid input, correct class of plot output, and visual regression testing using vdiffr.

Package Metadata and Maintenance

  • Updated the DESCRIPTION file: incremented the version to 1.0.0.9000, reorganized and expanded package dependencies, added a package URL, and improved formatting for clarity and maintainability (usethis::use_tidy_description()).

co-authored by Sebastian Voss @svoss09 sebastian.voss.ext@bayer.com

* adding test fixture as suggestion
* update plot tests, add snapshot
* use_tidy_description()
* Increment version number to 1.0.0.9000
* final plot adaptions
- minor tickmarks for x and y axis
- plot conditional an ggplot2 version

---------

Co-authored-by: svoss09 <sebastian.voss.ext@bayer.com>
@svoss09 svoss09 linked an issue Jul 10, 2026 that may be closed by this pull request
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.

Heatmap plot throws warning

1 participant