【发布时间】:2020-05-01 20:43:51
【问题描述】:
我将图表的大小设置为闪亮,但图表之间仍有空白区域
它们在配置高度和宽度之前显示为旧区域
这是我的代码
plot1_reactive <- eventReactive(input$submit_but,{
xaxis <- list(
tickformat = "%-d/%-m/%Y",
type='category'
)
yaxis <- list(title = input$sel_par1)
r <- plot_ly(mydata,x=date,y = a , type = 'scatter', mode = 'lines+markers'
, width = 950, height = 200,line = list(shape = "linear"))%>%
layout(xaxis = xaxis, yaxis = yaxis)
})
plot2_reactive <- eventReactive(input$submit_but,{
xaxis <- list(
tickformat = "%-d/%-m/%Y",
type='category')
yaxis <- list(title = input$sel_par2)
r <- plot_ly(mydata,x=date,y = b , type = 'scatter', mode = 'lines+markers'
, width = 950, height = 200,line = list(shape = "linear"))%>%
layout(autosize = F,xaxis = xaxis, yaxis = yaxis)
})
【问题讨论】:
标签: plot shiny plotly r-plotly