1

I have a waffle chart which looks like this:

enter image description here

using this code:

output$DS47<- renderPlot({
plot_tab6<-waffle(DS27$Prozent, rows=11)
  mydata <- c('Auslandsstudium'=57, 'Auslandspraktikum'=  30, 
              'Sprachkurs'=5, 'Studienreise'=11, 'Sonstige'=14 )
  plot_tab6 <- waffle(mydata, title = "lalalalal")
  return(plot_tab6)
})

however it is very small, especially the legend. How can I increase the size?

Marcus Campbell
  • 2,746
  • 4
  • 22
  • 36
FragenSteller
  • 61
  • 1
  • 9

1 Answers1

2

I didn't know waffle returns an ggplot object. I solved the issue using this code:

output$DS47<- renderPlot({
  mydata <- c('Auslandsstudium'=57, 'Auslandspraktikum'=  30, 'Sprachkurs'=5, 'Studienreise'=11, 'Sonstige'=14 )
  plot_tab6 <- waffle(mydata) +
    ggtitle("lalalala ?")+
    theme(plot.title = element_text(hjust = 0.5,size = 27, face = "bold", colour = "darkred"),
                              legend.text = element_text(size = 15))
  return(plot_tab6)
})
FragenSteller
  • 61
  • 1
  • 9