我在这里遇到了一个非常奇怪的情况。我使用shinydashboard,这是身体ui的一部分:
tabPanel('Break', icon = icon("adjust", "fa-2x"),
fluidRow(
column(6,h4("Break point")),
column(6,h4("") )
),
fluidRow(
column(12,plotOutput(outputId = "plot1",height = "auto") )
),br(),hr(),
fluidRow(
column(12,plotOutput(outputId = "plot2",height = "auto") )
)
)
这是我生成其中一个图表的非常简单的代码:
output$plot1<-renderPlot({
res%>%
ggplot(aes(x=CP, y=LP, z=Pr)) +
# geom_contour()+
geom_raster(aes(fill = Pr),alpha=0.85,show.legend = T,interpolate = T)+
scale_fill_gradient(low = "red2",high = "green4")+
facet_grid(Year~TS)+
theme_bw(base_size = 19)+
theme(legend.position="top",
strip.text.x = element_text(size = 18),
strip.text.y = element_text(size = 18),
panel.grid=element_blank(),
strip.background = element_blank(),
axis.line.x = element_line(color="black", size = 0),
axis.line.y = element_line(color="black", size = 0),
panel.border = element_blank()
)+
guides(fill = guide_legend(keywidth = 3, keyheight = 1))
},height = 800)
但是我想因为我的Ui中的情节高度设置为'auto',当我在我的服务器中生成大高度的情节时会弄乱事情,这: Screen shot 有什么建议吗?