Skip to content

Updates to plot2D #154

Merged
lmsimp merged 19 commits intomasterfrom
prettymaps
Mar 27, 2025
Merged

Updates to plot2D #154
lmsimp merged 19 commits intomasterfrom
prettymaps

Conversation

@lmsimp
Copy link
Copy Markdown
Collaborator

@lmsimp lmsimp commented Oct 24, 2024

In this PR I have addressed issues discussed in #111 and #152. All changes are relating to plot2D. Changes are:

Addition of UMAP:

  • UMAP dimensionality reduction has been added in the plot2D function.
  • Function is taken from umap in CRAN as discussed originally in issue Consider using UMAP embedding method #111. I feel it meets our needs and defaults work pretty well for LOPIT data.
  • The default parameters have been maintained but can be tested and changed as per methargs as we would for t-SNE. I have also added an example to the intro vignette

New/changes to arguments in plot2D

  • Removal of grid = TRUE as the default
  • Removal of dev.new in addLegend. Instead of plotting a device in a new window, plots the legend in the default plot space.
  • bg filling of points parameter as is implemented in par
  • lwd specification of the line width
  • palette specify "light" or "dark", helps users generate nice colour palette for point filled characters. Uses the lighten and darken functions from colorspace package.
  • t controls degree of lightening of palette (from colorspace)
  • The stockpch is now c(21:25, 1, 15, 0, 17, 2, 18, 5, 7, 9, 13, 3, 4, 8) to allow filled point characters by default
  • Also, added functions getStockbg and friends see here and updated docs to aid in the above.

Unit tests:

@lgatto There doesn't seem to be any breaking changes. All vignettes run and plots are generated in the new style with no issues. Package passed build, check and install. Appreciate this is very last minute but would be great to have this in the new release if possible.

@lmsimp lmsimp requested a review from lgatto October 24, 2024 16:04
@lmsimp lmsimp merged commit 6647c2f into master Mar 27, 2025
1 of 2 checks passed
@lmsimp lmsimp deleted the prettymaps branch September 17, 2025 09:24
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.

1 participant