Skip to contents

depictr 0.2.2

Examples that match the chart

  • The precision-recall, gain and lift examples move to an outcome with a scarce positive class, which is the case those charts are documented for. They previously ran on an outcome that was 94 per cent positive, so the gain curve sat on the diagonal and lift hovered at one.
  • The calibration example fits a model and plots its predicted probabilities, a reliability curve being a check on a fitted model rather than on a raw score.
  • The power-curve article names the effect the shipped simulation actually covers, and its no-simr branch reads a summary derived from that simulation, so the two branches agree by construction.

Fixes

  • vif_plot() restricts its scale to the severity levels present, which removes an empty key entry from the rendered figure.

depictr 0.2.1

Documentation

  • The introductory vignette shows depictr_palette() returning the palette’s hex colours directly, ready for scale_fill_manual() or a base-graphics col = argument, and shows depictr_options() setting defaults for every later plot and returning the previous values, so the earlier look can be put back afterwards.
  • vignette("diagnostics-and-uncertainty") saves an arranged panel with save_plot(), which writes at a print-ready 300 dpi by default and creates any missing directories.
  • vignette("multivariate-and-survival") adds k_diagnostic(method = "gap"), which compares within-cluster dispersion against a null reference and so, unlike the other two criteria, can support k = 1.
  • vignette("time-series") adds classical decomposition, which holds the seasonal component fixed across the series where STL lets it evolve from year to year.
  • The optimizer_fixef_plot() and power_curve_plot() reference pages describe what each plot shows rather than the prototype gists they grew from.
  • On the documentation site, source chunks are set a little smaller than the output and the prose, so a typical line fits the narrower home and article columns without horizontal scrolling, and the copy button stays attached to its code block.

depictr 0.2.0

Fixes

  • roc_curve_plot() rejects a ci that resolves to fewer than one bootstrap resample with a clear error, instead of silently drawing an all-NA band and an [NA, NA] AUC annotation.

Data

  • In wellbeing_survey, region now genuinely shifts stress and income, which flow through to life satisfaction, so the region-grouped plots (faceted densities, ridgelines, the region dendrogram) compare real contrasts rather than four samples of the same distribution. The bundled datasets are regenerated by data-raw/generate_datasets.R as before.

Citation

  • The package citation (inst/CITATION and CITATION.cff) carries the Zenodo concept DOI, and the citation title uses sentence case.

Documentation

  • The package overview (?depictr) lists every exported function and all five bundled datasets; previously several functions and two datasets were missing.
  • The vif_plot() example fits deliberately collinear predictors, so the plot shows inflated VIFs sitting above the threshold line instead of near-identical bars around 1 with the line off the axis.
  • depictr_options() describes what brand and accent actually drive, and depictr_palette() notes that qualitative colours interpolated beyond the base set are not guaranteed to stay distinguishable under colour-vision deficiency.
  • lift_plot() documents its own top-right inside-legend corner rather than inheriting gain_plot()‘s bottom-right wording, and DESCRIPTION notes that composite panels return ’patchwork’ objects.
  • References throughout the documentation follow APA 7 and carry DOIs, and spelling is consistently British (en-GB).
  • The documentation site’s home page is restructured around a pitch, gallery and signposts; the time-series decomposition example draws its trend confidence band; and LICENSE.md carries the full MIT text so the site’s licence page renders in full, as in the sibling packages.

Packaging and checks

  • Example variants that render several multi-panel figures (posterior_plot(), residual_diagnostics_plot(), decompose_plot()) are wrapped in \donttest{} so each example file stays within CRAN’s five-second budget; the first call of every example still runs.
  • CITATION.cff and the test artefact Rplots.pdf are excluded from the build tarball, and the test that produced Rplots.pdf draws to a null device instead.
  • New tests pin the legend_inside gates: the legend moves inside the panel when a plot’s gate is satisfied and the theme is left alone when it is not.

depictr 0.1.1

  • Documentation and packaging polish, with no change to the plotting API.
  • The documentation site adopts the shared house style used across the package family, with a citation page carrying a copyable and downloadable BibTeX entry.
  • Consolidated to a single LICENSE file, and added community and contribution files.

depictr 0.1.0

First release. depictr is a unified, consistent toolkit of publication-ready plots spanning the whole analysis workflow. It grew out of, and generalises, three earlier plotting functions (frequentist_bayesian_plot, plot.fixef.allFit and powercurvePlot).

Exploring data

Multivariate, clustering and survival

Time series

Model estimates and inference

Diagnostics and classification

Uncertainty and power

  • posterior_plot() summarises posterior draws with a choice of styles ("halfeye", "interval", "gradient" or "dots") and can annotate a region of practical equivalence (ROPE) and the probability of direction.
  • power_curve_plot() for power-analysis curves (e.g. from simr).

Theming and reporting

Layout and legibility

  • coefficient_plot(), compare_models(), posterior_plot() and frequentist_bayesian_plot() gain a facet/scales option that lays each term out in its own free-scaled panel, so terms on very different scales (a large intercept alongside small slopes) stay legible instead of being squished onto the zero line. frequentist_bayesian_plot() uses this layout by default.
  • A pass over every plot for legibility: silhouette_plot() cluster labels no longer clip; raincloud_plot() uses one colour per group across all layers; dendrogram_plot() hides leaf labels for large trees; confusion_matrix_plot() picks each label’s colour from the tile luminance; gain_plot()/lift_plot() label their reference lines; timeseries_plot() shows a single legend; and k_diagnostic() now returns the diagnostic curve as a plot.
  • coefficient_plot() gains standardise, scaling each coefficient by its predictor’s standard deviation so magnitudes are comparable; model_report() uses it by default, removing the empty band in its coefficient panel.
  • vif_plot() shows the ordinary VIF (not its square root) for single-df terms, scales the axis to the data, and draws a single clearly-labelled threshold line (reported in the caption when it is off-axis) – no more wide empty band or hard-to-read guides.
  • seasonal_plot(style = "season") reverses its sequential legend so the darkest, most-recent cycle sits at the top, matching the plotted order.
  • Factor coefficient names are prettified by default to the effect (variable) name – conditionunrelated becomes condition, word_frequency becomes word frequency – in coefficient_plot(), compare_models() and frequentist_bayesian_plot() (read from the model); optimizer_fixef_plot() and posterior_plot() gain a labels argument for the same. Any user-supplied labels take precedence. pca_plot() likewise shows underscores in its loading-arrow labels as spaces (soil_ph -> soil ph).
  • Redundant cluster legends are dropped: silhouette_plot() (the bands are labelled in place) and cluster_plot() when the centroids are labelled.
  • survival_plot(): the log-rank annotation renders a proper chi-squared and an italic p, formatted APA style (no leading zero, p < .001 below that threshold); the median guide is labelled “median ”; the y-axis title margin is tighter; and the colour legend and the number-at-risk table list the groups in the same order, following the group factor’s levels.
  • A legend_inside argument (off by default) draws the legend inside the panel, over a semi-transparent background, in a corner the plot usually leaves empty – reclaiming the right-hand margin. It is offered by roc_curve_plot(), gain_plot(), lift_plot() (bottom-right / top-right of the curve), ecdf_plot(), survival_plot(), explore_distribution(), dumbbell_plot() and missingness_map(). For any other plot the same is one theme() call; vignette("exploring-data") shows how, alongside tidying legend titles.
  • theme_depictr() now centres legend titles over their keys, which reads more tidily than ggplot2’s default left alignment – especially for an inside or a top/bottom legend.
  • estimation_plot() reserves more headroom above the lower panel so the effect-size annotation (Hedges’ g / Cohen’s d) is never clipped.
  • scree_plot() colour-matches and names its dual axes – “Variance explained (bars)” on the left, “Cumulative (line)” on the right.
  • Statistical letters are italic in annotations: the log-rank p, model_report()’s n and R, and estimation_plot()’s g / d.
  • British (en-GB) spelling throughout: the crop_yield column is now fertiliser, coefficient_plot()/model_report() take standardise, and confusion_matrix_plot() takes normalise.

Data

  • Five reproducibly simulated datasets: lexical_decision (counterbalanced priming experiment), wellbeing_survey (with realistic missingness), crop_yield (a fertiliser-by-treatment field trial), clinical_trial (right-censored survival with a rare adverse event) and monthly_sales (two seasonal retail series).

Accessibility

  • The qualitative palette is based on the colourblind-safe Okabe-Ito set (led by the depictr brand blue), and depictr_palette() provides sequential and diverging variants. palette_preview() can show any one, or all three, and can simulate deuteranopia, protanopia or tritanopia so a palette’s legibility can be checked directly.

Notes

  • Heavier modelling back-ends (lme4, broom, simr, survival, brms, posterior, ggdist, cluster, boot) are in Suggests and used only when available, so the package installs and checks without them. Vignettes draw on small precomputed model fits shipped in inst/extdata/, so they knit without a Bayesian or mixed-model toolchain.
  • Functions with an optional seed (cluster_plot(), qq_plot() and residual_diagnostics_plot()) restore the caller’s random number generator state afterward, so passing one for reproducibility has no side effect on your own subsequent random draws.