Skip to content

Commit 9504e38

Browse files
cpsievertclaude
andcommitted
Add plotly_build method for ggmatrix objects
plotly_build() now works with ggmatrix objects (e.g., from GGally::ggpairs()). Previously, ggplotly() worked but plotly_build() did not have a method for this class. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b6d8059 commit 9504e38

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ S3method(linewidth_or_size,default)
3232
S3method(linewidth_or_size,element)
3333
S3method(plotly_build,"NULL")
3434
S3method(plotly_build,gg)
35+
S3method(plotly_build,ggmatrix)
3536
S3method(plotly_build,list)
3637
S3method(plotly_build,plotly)
3738
S3method(print,api)

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
## Bug fixes
1212

13+
* `plotly_build()` now works with `ggmatrix` objects (e.g., from `GGally::ggpairs()`).
1314
* Closed #2337: Creating a new `event_data()` handler no longer causes a spurious reactive update of existing `event_data()`s. (#2339)
1415
* Closed #2376: Removes errant boxmode warning for grouped boxplot. (#2396)
1516
* Closed #2392: Trivial warning about RColorBrewer minimal n value is no longer thrown (#1999)

R/plotly_build.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ plotly_build.gg <- function(p, registerFrames = TRUE) {
3737
plotly_build(ggplotly(p))
3838
}
3939

40+
#' @export
41+
plotly_build.ggmatrix <- function(p, registerFrames = TRUE) {
42+
plotly_build(ggplotly(p))
43+
}
44+
4045
#' @export
4146
plotly_build.plotly <- function(p, registerFrames = TRUE) {
4247

0 commit comments

Comments
 (0)