patchwork icon indicating copy to clipboard operation
patchwork copied to clipboard

A bug in wrap_elements() ?

Open axitamm opened this issue 1 year ago • 0 comments

library(circlize) #version 0.4.16 library(patchwork) #version 1.3.0

df <- data.frame( from = c("A", "A", "A", "A","A"), to = c("A", "B", "C", "D","E"), value = c(200, 2, 9, 3, 0))

wrap_elements(full = ~chordDiagram(x = df)) #this function executes and results in a plot

###################

df <- data.frame( from = c("A", "A", "A", "A","A"), to = c("A", "B", "C", "D","E"), value = c(400, 2, 9, 3, 0)). #I only changed the first value from 200 to 400

wrap_elements(full = ~chordDiagram(x = df)) #this function does NOT execute. Note that chordDiagram(x=df) by itself works just fine.

Error in unit(x, default.units) : 'x' and 'units' must have length > 0

May you please troubleshoot and fix this, if possible?

axitamm avatar Jan 21 '25 21:01 axitamm