Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
^\.pixi
^pixi\.toml$
^pixi\.lock$
^demo_output
^legacy examples
^test_simple_dice\.R$
^test_fill_legend_fix\.R$
^Rplots\.pdf$
^\.github
^\.DS_Store$
^\.claude
^CLAUDE\.md$
^examples
^README\.html$
^data-raw$
15 changes: 8 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ggdiceplot
Title: DicePlot Visualization for ggplot2
Version: 1.0.0
Version: 1.1.0
Authors@R:
person(
given = "Matthias",
Expand All @@ -20,15 +20,16 @@ Description: Provides ggplot2 extensions for creating dice-based visualizations
License: MIT + file LICENSE
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
URL: https://github.com/maflot/ggdiceplot
BugReports: https://github.com/maflot/ggdiceplot/issues
Imports:
Imports:
dplyr,
ggplot2 (>= 3.4.0),
grid,
dplyr,
legendry,
scales
scales,
tibble
LazyData: true
Depends:
R (>= 4.0.0)
Depends:
R (>= 4.1.0)
23 changes: 2 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,2 @@
MIT License

Copyright (c) 2024 Matthias Flotho

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
YEAR: 2026
COPYRIGHT HOLDER: Matthias Flotho
6 changes: 6 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ export(geom_dice)
export(make_offsets)
export(scale_dots_discrete)
export(theme_dice)
importFrom(dplyr,bind_rows)
importFrom(dplyr,distinct)
importFrom(dplyr,filter)
importFrom(ggplot2,"%+replace%")
importFrom(ggplot2,Geom)
importFrom(ggplot2,aes)
Expand All @@ -15,6 +18,7 @@ importFrom(ggplot2,ggproto)
importFrom(ggplot2,layer)
importFrom(ggplot2,theme)
importFrom(ggplot2,theme_grey)
importFrom(grid,drawDetails)
importFrom(grid,gpar)
importFrom(grid,grobTree)
importFrom(grid,nullGrob)
Expand All @@ -23,3 +27,5 @@ importFrom(grid,rectGrob)
importFrom(grid,unit)
importFrom(legendry,guide_legend_base)
importFrom(scales,pal_hue)
importFrom(tibble,column_to_rownames)
importFrom(tibble,remove_rownames)
61 changes: 61 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# ggdiceplot 1.1.0

## New features

* **`pip_scale` parameter** — New argument to `geom_dice()` that controls pip
diameter as a fraction (0–1) of the maximum available space inside each die
face. When `size` is constant (not mapped), all pips are drawn at
`pip_scale × max_diameter`. When `size` is mapped to a variable, pips scale
between 25% and `pip_scale` of the maximum pip diameter. Set `pip_scale = NULL`
to disable auto-scaling and use the raw `size` aesthetic (legacy behaviour).
Default: `0.75`.

* **Deferred rendering via `DiceGrob`** — Pip sizing is now calculated at
grid draw time rather than ggplot build time, so pip diameters adapt
correctly to the final figure dimensions.

* **Scale expansion for edge tiles** — `setup_data` now exposes
`xmin`/`xmax`/`ymin`/`ymax` so ggplot2 trains axis scales to include the
full tile area, preventing clipping of border tiles.

* **New datasets** — `sample_dice_large` (480 rows, 60 taxa) and
`sample_dice_miRNA` (~90 rows, miRNA dysregulation) are included for
demonstrating high-density and categorical-fill use cases.

## Breaking changes

* **Minimum R version raised to 4.1.0** (was 4.0.0). R 4.1 is required for
the native pipe operator (`|>`) used internally.

* **`tibble` is now a hard dependency** — added to `Imports` for
`column_to_rownames()` / `remove_rownames()`.

* **`draw_panel` signature changed** — The method now takes explicit named
arguments (`na.rm`, `ndots`, `x_length`, `y_length`, `pip_scale`) instead of
`params, ...`. Code that subclassed `GeomDice` or called `draw_panel`
directly will need updating.

* **Sample datasets restructured**:
- `sample_dice_data1`: 48 rows → 160 rows (8 taxa × 4 diseases × 5
specimens). Columns are the same but `lfc` and `q` may now contain `NA`.
- `sample_dice_data2`: 48 rows → 160 rows; the `replicate` column has been
removed. Column count changed from 6 to 5.

* **Legend key for unmapped fill** — When `fill` is not mapped, legend keys now
draw a solid black dot instead of an empty circle, making spatial/dots-only
legends more readable.

## Minor changes

* `LICENSE` switched to CRAN-standard two-line format (`YEAR` / `COPYRIGHT
HOLDER`).
* `.Rbuildignore` added to exclude pixi, demo output, test scripts, and other
non-package files from the R CMD build tarball.
* `data-raw/` directory created; dataset-generation scripts moved there from
`data/`.
* `pixi.toml` / `pixi.lock` added for reproducible environment management.
* Demo scripts (`create_demo_plots.R`, `test_simple_dice.R`) rewritten to
exercise the new `pip_scale` feature and run from the project root.
* README updated with new examples, a parameter table, and the published
Bioinformatics citation.
* RoxygenNote bumped to 7.3.3.
Loading