我还没试过
chorddiag
包裹(我不认为它在CRAN上,也许是其他一些回购?),但
manipulateWidget
包裹可能是你想要的。
example(combineWidgets)
具有以下代码:
data(iris)
library(manipulateWidget); library(plotly)
#> Loading required package: ggplot2
#>
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#>
#> last_plot
#> The following object is masked from 'package:stats':
#>
#> filter
#> The following object is masked from 'package:graphics':
#>
#> layout
combineWidgets(title = "The Iris dataset",
plot_ly(iris, x = ~Sepal.Length, type = "histogram", nbinsx = 20),
plot_ly(iris, x = ~Sepal.Width, type = "histogram", nbinsx = 20),
plot_ly(iris, x = ~Petal.Length, type = "histogram", nbinsx = 20),
plot_ly(iris, x = ~Petal.Width, type = "histogram", nbinsx = 20)
)
创建于2022-03-24由
reprex package
(v2.0.1)
编辑以添加:
好吧,我找到了
弦线图
在Github上:
https://github.com/mattflor/chorddiag/
。运行完代码后,这将结合三个图表:
manipulateWidgets::combineWidgets(shiny::tagList(ll))
它们不能很好地调整大小;我怀疑那是因为
弦线图
想成为全屏显示,但可能在
manipulateWidgets
。你可能需要修补其中一个。