상자에 표시하는 플롯이 있는데 상자의 크기를 수정하고 싶지만 플롯이 box보다 큽니다. 두 가지를 모두 수정하여 플롯이 남아 있도록하려면 어떻게해야합니까? 상자에 맞습니까?R 반짝이 플롯 크기
#in ui.r
box(
title = "Veniturile si cheltuielile",
status = "primary",
solidHeader = TRUE,
collapsible = TRUE,
plotOutput("ven_vs_chelt")
)
#in server.r
output$ven_vs_chelt <- renderPlot({
ggplot(ven_ch, aes(x=ven_ch$ani_tot, y=ven_chelt, fill=tip)) +
geom_bar(stat="identity", position=position_dodge(), colour="black") +
xlab("An") + ylab("Valoare venituri si cheltuieli(lei)") +
scale_fill_manual(values=c("#F78181", "#81F79F"))
})
몇 가지 힌트 : 당신은 플롯 크기 수정 같이 할 수있는 1) 재현 코드를해야 응답을 얻으려면을, https://stackoverflow.com/questions/5963269/how-to- 참조 make-a-great-r-reproducible-example을 사용합니다. 2) 더 일반적인 당신은 동적 UI 요소를 찾고 있습니다. 그러므로'renderUI()'를 살펴보아야한다. 추가 질문이 있으시면 1)을 참조하십시오. – BigDataScientist