thisplot 0.4.6
- compatibility:
- Require ggplot2 4.0.0 or later and use its public theme completion
API.
- Require thisutils 0.5.0 or later for optional dependency checks
without installing packages during plotting. Only hull marks require
concaveman.
- feat:
- Add
NetworkPlot() to draw a network from an edge data
frame and an optional node data frame, with igraph layouts
(fr, kk, circle) or user-supplied
coordinates, edge width and colour by weight and group, node group
colour, shape and size mapping, repelled labels, highlight rings, and
theme control. Duplicate edges are collapsed to the strongest weight and
self-loops dropped.
- Add
rasterise_plot(), which renders the point and line
layers of a ggplot or patchwork object as 300
dpi rasters, recursing into the sub-plots of a composite, so figures
with many elements stay small and fast to draw. Layers are rendered with
the ragg device, which, unlike the Cairo
device of the underlying package, needs no X11.
- Add
plot_scatter() and plot_histogram()
using theme_this() and thisplot palettes. Correlation
annotation no longer depends on ggpubr; point density and
marginal plots remain optional.
StatPlot() value bars can show numeric labels through
label = TRUE.
get_colors() can now take ggplot or
patchwork objects and returns a two-column data frame with
the factor levels and their mapped colors used in the plot(s).
get_colors() also accepts other renderable plot objects
(gtable, grob, gList,
ComplexHeatmap::Heatmap, pheatmap,
trellis) and returns the colors used in the plot with their
Chinese names.
- Raise a clear error when an unsupported object type is passed to
get_colors().
- Add
print_colored_table() for ANSI-colored data-frame
output, with palette colors assigned by column by default and optional
row coloring.
- Keep table headers uncolored and omit separator rules for compact
console output.
- Add
invert_svg() to build a dark-mode variant of an SVG
by replacing every colour with its RGB complement and giving fill-less
elements a light inherited fill. Rasters embedded as
data:image/png;base64,... payloads, such as the colour bar
of a continuous ggplot2 legend, are complemented pixel by pixel too,
which invert_raster = FALSE turns off. The
rgb() notation written by cairo-based devices such as
grDevices::svg() is understood as well, and a file that
holds no colour to invert is reported instead of being copied
silently.
- Add
invert_png() for a PNG on its own and
invert_figures() to invert several figures at once, given
files or directories. Both name their copy after the input with a
-dark suffix, and invert_figures() skips files
that already carry that suffix.
- fix:
- Invert color animation values when the target SVG attribute is a
color, preserving non-color animations and element references.
- Preserve edge endpoints with missing weights when constructing
network layouts, including circular layouts that do not use
weights.
- Preserve SVG element references and CSS selectors when inverting
colors.
- Keep zero-weight edges in network plots while excluding them from
layout forces, so the
fr and kk layouts accept
zero weights.
- Center the rotated y-axis label along the coordinate arrow in
theme_blank() across panel sizes and custom arrow
lengths.
- Align
get_colors() and colored-table columns using
ANSI-aware terminal display widths, including Chinese text.
- Apply distinct palette colors consistently when printing colored
tables.
- docs:
- Streamline documentation for optional
ComplexHeatmap
helpers.
thisplot 0.4.4
- fix:
- Restore
ComplexHeatmap as an optional dependency so
thisplot can be installed from repositories that do not
package Bioconductor dependencies.
- Check for
ComplexHeatmap when heatmap-specific helpers
are used and run their examples only when the optional package is
available.
thisplot 0.4.3
- feat:
- Add
major_grid() for reusable major-grid control.
- Let block heatmap annotations control border colour and line
width.
- fix:
- Declare
ComplexHeatmap as an imported dependency so
heatmap examples run on clean check systems.
thisplot 0.4.1
- feat:
StatPlot(): Added direct x-axis label rotation control
via x_text_angle.
StatPlot(): Major panel grid settings now consistently
control percent trend plots.
- docs:
- Documented
x_text_angle validation and updated release
metadata.
thisplot 0.3.9
- feat:
DimDataPlot(): New lightweight helper for plotting
supplied 2D coordinates from data frames, with grouping, splitting,
shape mapping, labels, palettes, theme controls, and optional group
marks.
StatPlot(): Added configurable major panel grid lines
via grid_major, grid_major_colour,
grid_major_linetype, and
grid_major_linewidth.
StatPlot(): Added optional
venn_engine = "venny" support for more flexible 2-4 set
Venn diagrams while keeping ggVennDiagram as the
default.
- docs:
- Added documentation and examples for
DimDataPlot().
- Updated
StatPlot() documentation for the new major grid
controls.
- Added
StatPlot() documentation and examples for the
optional venny Venn backend.
thisplot 0.3.8
- feat:
- Add migration helpers:
to_percent(): convert values to percentages after
unit-sum normalization.
annotate_quadrants(): add quadrant guide lines and
percentage labels to scatter plots.
clip_symmetric_range(): clip values to symmetric lower
and upper limits.
jitter_highlighted_points(): deterministically jitter
highlighted points for stable plotting output.
visual_colors(): add adaptive label layout via
label_mode, with tighter HTML rendering for Chinese,
pinyin, RGB, and hex labels.
ChineseColors$visual_colors(): pass
name_type through to the layout mode so different label
types use matching display rules.
get_chinese_palettes(): use
color_sets$Chinese as the default Chinese palette and add a
fallback palette definition when the dataset metadata is
incomplete.
- docs:
- Add runnable examples for the migration helper functions.
- Add documentation entries for
annotate_quadrants(),
clip_symmetric_range(),
jitter_highlighted_points(), and
to_percent().
- Expand Chinese color examples to show the default
color_sets$Chinese palette.
- Update
visual_colors() documentation for the new
adaptive label layout mode.
- data:
- Refresh the Chinese color palette metadata and dataset defaults used
by
ChineseColors().
- Improve Chinese color ordering and default palette selection used
for generated palette sets.
thisplot 0.3.7
- feat:
GraphPlot(): New function for graph visualization with
node/edge layers, optional transition arrows, highlighting, labels,
palettes, and theme customization.
compute_velocity_on_grid(): New function to compute
smoothed velocity vectors on an embedding grid, with optional adjustment
for stream-style visualization.
palette_colors(): Changed the default
palette from "Paired" to
"Chinese".
- docs:
- Heatmap helpers:
- Refined documentation for
annotation_block_fill_graphics() and
build_heatmap_annotation().
- deps:
- Added
ggnewscale and reshape2 to
Imports.
thisplot 0.3.6
- feat:
StatPlot(): Optimized venn plot rendering by using
coord_fixed(ratio = 1, clip = "off").
- Heatmap functions:
annotation_block_fill_graphics()
annotation_block_graphics()
annotation_graphics()
build_heatmap_annotation()
cluster_within_group2()
heatmap_fixsize()
heatmap_rendersize()
normalize_drawable()
thisplot 0.3.5
- feat:
- Sankey
make_long(): Converts a wide data frame to long format
for geom_sankey / geom_alluvial, with optional
value column for weights.
geom_sankey(): Sankey diagram layer (nodes and
flows).
geom_sankey_label(), geom_sankey_text():
Sankey node label layers.
geom_alluvial(): Alluvial diagram layer.
geom_alluvial_label(),
geom_alluvial_text(): Alluvial label layers.
geom_sankey_bump(): Sankey bump diagram layer.
theme_sankey(), theme_alluvial(),
theme_sankey_bump(): Themes for sankey/alluvial plots.
thisplot 0.3.4
- feat:
StatPlot(): New function to visualize data using
various plot types including bar plots, rose plots, ring plots, pie
charts, trend plots, area plots, dot plots, sankey plots, chord plots,
venn diagrams, and upset plots. Supports grouping, splitting, background
coloring, and extensive customization options.
- docs:
StatPlot(): Added comprehensive parameter documentation
for all function arguments including group.by,
split.by, palette, palcolor,
title, subtitle, xlab,
ylab, legend.position,
legend.direction, theme_use,
theme_args, combine, nrow,
ncol, byrow, force, and
seed.
StatPlot(): Updated examples to use generic test data
instead of single-cell specific datasets, making the function more
accessible as a general-purpose plotting tool.
thisplot 0.3.2
- docs:
README: Converted from static Markdown to R Markdown
(README.Rmd) for dynamic content generation. Code examples
now execute and display actual output instead of static images.
thisplot 0.3.1
- feat:
check_ci_env(): New function to detect if the current
environment supports browsable HTML output. Now detects local pkgdown
builds via IN_PKGDOWN environment variable and knitr HTML
output contexts.
head.colors(): New S3 method for colors
objects, allowing the use of head() function to limit the
number of displayed rows (default n = 6L).
visual_colors(): Integrated
htmltools::browsable functionality. Added
browsable parameter (default NULL for
auto-detection) to automatically display widgets in appropriate
environments. Automatically detects interactive sessions and GitHub
Actions pkgdown workflow, while preventing browser opening during CRAN
checks.
ChineseColors$visual_colors(): Added
browsable parameter support, consistent with the global
visual_colors() function.
get_colors(): Now automatically infers RGB values from
hex codes when colors are found in palettes but not in the main dataset.
Added internal hex_to_rgb() helper function to convert hex
color codes to RGB format strings.
thisplot 0.3.0
- feat:
get_colors(): New function to search for colors in the
Chinese colors dataset and all available palettes. Supports searching by
palette names, color names (pinyin or Chinese), numbers, or hex codes.
Automatically reports which palette(s) contain the found colors.
print.colors(): New print method for colors objects to
display color information with ANSI color support in terminal.
- Updated Chinese color system with improved functionality.
thisplot 0.2.0
- feat:
- Chinese traditional color system
ChineseColors(): New function to create a Chinese
traditional color system object with 1058 representative colors
extracted from traditional Chinese color charts. Supports accessing
colors by name (pinyin or Chinese), number, or hex code, creating color
palettes, and generating segmented colormaps.
visual_colors(): New function to visualize colors in
HTML format with a grid of color swatches, supporting optional names,
RGB values, or hex codes.
get_chinese_palettes(): New function to get Chinese
color palettes organized by color categories (blue, green, yellow, red,
brown, purple, etc.) with automatic continuous palette generation.
- data:
chinese_colors: New data object containing 1058 Chinese
traditional colors.
- docs:
- Added comprehensive documentation for Chinese color system
functions.
- Updated package documentation to include Chinese traditional colors
feature.
thisplot 0.1.0