Changelog¶
The release notes below are the package's own NEWS.md, pulled into this page
at build time rather than copied. There is one list of changes and it lives in
the repository root, where R CMD check and CRAN read it, so this page cannot
fall behind it. Each release is a heading under this one, so both of them show
up in the table of contents on the right.
Version numbers follow CRAN's convention: 0.1.1 is the version on CRAN, and
0.1.2 is on main and not yet submitted. packageVersion("mycolorsTB") tells
you which one you have, which matters because three of the 0.1.2 changes alter
what a 0.1.1 script does: one returns different colours, and two stop with an
error where 0.1.1 quietly carried on. Those three are laid out with their old
behaviour in
Troubleshooting.
mycolorsTB 0.1.2¶
Bug fixes¶
-
view_palette()no longer triggers the ggplot2 deprecation warning about thesizeaesthetic for lines. The tile borders now uselinewidth. -
view_palette()writes each hex code in black or white depending on the luminance of its own swatch. Previously the labels were always black, which made them unreadable on dark colours such as#020203in thepathogenomicspalette. -
tb_palette()returns the palette colours unchanged whilendoes not exceed the palette size, and interpolates only when more colours are requested than the palette holds. Before this release every call interpolated, sotb_palette(5, "mycolors")returned five colours that matched no lineage, contradicting the warning the function itself emits. -
tb_palette()andview_palette()validatepalette_name. A non-character value used to reachswitch()and silently select a palette by position, sotb_palette(3, 2)quietly returned colours from a palette the caller never named. -
tb_palette()validatesn. Negative, missing, infinite and fractional values used to fail with an internal message fromcolorRampPalette()or to round silently. -
plot_tb_tree()andplot_tb_cladogram()reject input that is not a single Newick tree. Malformed strings madeape::read.tree()returnNULL, and the functions went on to build a plot with an empty axis range instead of reporting the problem.
Improvements¶
-
The four
scale_*_mycolors()andscale_*_classicTB()functions accept...and pass it to the underlying ggplot2 scale, so arguments such asname,labelsandna.valuecan now be set. -
grDevicesis declared inImports, andggplot2carries the>= 3.4.0requirement implied by the use oflinewidth. -
The
images/directory is excluded from the build, which removes theR CMD checknote about a non-standard top level directory and drops around 490 KB from the source tarball. The README keeps rendering the images from GitHub. -
The README figures have dark-theme variants, served through a
<picture>element, so the ink of the logo and the axis and legend text of the example chart stay legible on GitHub's dark canvases. The light files keep their current names, so every existing link to them still resolves. -
The example chart is generated from a fixed seed, and the README snippet now carries the same
set.seed()call, so the data behind the figure is reproducible.images/example1.pngtherefore shows different data than it did in 0.1.1. The committed render comes from.github/scripts/make_example_plots.R, which draws the same seeded data as the snippet and adds a transparent background and tightened legend keys so that all 14 entries and the legend title fit in the figure. Both README figures are rebuilt by the scripts in.github/scripts/.
mycolorsTB 0.1.1¶
- First CRAN release.