@@ -2877,22 +2877,33 @@ output$gofplotcompdownload <- downloadHandler(
28772877 n <- values $ modeltotal
28782878 if (gofterm == ' ' ){
28792879 cols <- 3
2880- innermat <- matrix ( 1 : ( n * cols ), ncol = cols , byrow = TRUE )
2880+ lastelt <- 15
28812881 bottommat <- c(0 ,(n * cols + 1 ): (n * cols + 3 ))
28822882 bottomtext <- c(" degree" ," espartners" ," distance" )
2883+ pdf(file = file , height = 8.5 , width = 11 )
28832884 } else {
28842885 cols <- 1
2885- innermat <- matrix ( 1 : n , ncol = 1 , nrow = n )
2886+ lastelt <- 7
28862887 bottommat <- c(0 ,n * cols + 1 )
28872888 bottomtext <- input $ gofterm
2889+ pdf(file = file , height = 11 , width = 8.5 )
28882890 }
2889- pdf( file = file , height = 2.5 * n , width = 4 * cols )
2891+
28902892 sidemat <- (bottommat [length(bottommat )]+ 1 ): (bottommat [length(bottommat )]+ n )
28912893 sidetext <- paste(" Model" ,1 : n )
2894+ innermat <- matrix (1 : (n * cols ), ncol = cols , nrow = n , byrow = TRUE )
28922895 layoutmat <- cbind(sidemat ,innermat )
2893- layoutmat <- rbind(layoutmat , bottommat )
2896+ if (n < 3 ){
2897+ extra <- 3 - n
2898+ last <- sidemat [length(sidemat )]
2899+ m <- matrix ((last + 1 ): lastelt , nrow = extra , byrow = TRUE )
2900+ layoutmat <- rbind(layoutmat , bottommat , m )
2901+ } else {
2902+ layoutmat <- rbind(layoutmat , bottommat )
2903+ }
2904+
28942905 widths <- c(1 ,rep(3 ,cols ))
2895- heights <- c(rep(3 ,n ),1 )
2906+ heights <- c(rep(3 ,n ),1 ,rep( 3 , 3 - n ) )
28962907 layout(layoutmat , widths = widths , heights = heights )
28972908 par(mar = c(1 ,2 ,2.2 ,1 ), omi = c(0 ,0 ,.3 ,0 ))
28982909
0 commit comments