如何解决我无法让 gganimate 对象适合我的 R-Shiny 应用程序的主面板
如果我在 Shiny 应用程序中绘制一个 gganimate 对象,它会占据整个屏幕!完全删除我所有漂亮的输入栏。我想知道,我如何保持我的输入?
看看这个简单的例子。
在此先感谢您的帮助 !
丹
library ( shiny )
library ( gganimate)
library ( ggplot2)
ui = fluidPage(
textInput("a","put letters here",value = "dave" ),plotOutput("b")
)
server = function(input,output){
output$b= renderPlot ( {
p = ggplot(iris,aes(x = Petal.Width,y = Petal.Length)) +
geom_point()+
transition_states(Species)+
ggtitle ( input$a)
animate ( p,nframes = 40)
} )
}
shinyApp ( ui,server)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。