Closed ajpelu closed 6 years ago
Para aumentar el tamaño de los plotOutpus, dendro de plotOutput()
, incluir el argumento height=
. Como el tamaño será igual para todos los plots, he definido una variable al inicio llamada h_plots
y le he asignado el valor 1000.
Para eliminar el box de los levelplot, hay que ajustar varios parámetros:
axis.line = list(col = "transparent")
dentro de rasterTheme()
. En este caso como se ha definido un richness_theme
al inicio, tenemos que modificarlo ahi. par.settings = list(axis.line = list(col = "transparent"))
en el mapa de configuracion incial del paisaje, dentro de la función levelplot()
UPDATE
, tamaño.
Vamos a utilizar un solo panel para los mapas, por tanto el height se define igualmente en el plotOutput
, pero en este caso lo hacemos en server.R
ya que todos los plotOutputs
se trasladan allí.
Se han incluido los spinners de load. Se incluyen en los plotOutputs()
en el server.
Add buttons for each plot. He seguido las directrices de este ejemplo:
library(shiny)
ui=shinyUI(
fluidPage(
sidebarLayout(
sidebarPanel(
hr(),
actionButton("button1", label = "Button 1"),
hr(),
actionButton("button2", label = "Button 2"),
width = 2
),
mainPanel(
wellPanel(
uiOutput("plots")
)
)
)
)
)
server=shinyServer(function(input, output) {
observeEvent(input$button1, {
output$plots=renderUI({plotOutput("plot")})
output$plot <- renderPlot({
plot(1:10)
})
})
observeEvent(input$button2, {
output$plots=renderUI({plotOutput("plotly")})
output$plotly <- renderPlot({
plot(20:30)
})
})
})
shinyApp(ui,server)
Se han creado infoBox con valores de riqueza. Faltaría incluir titulo a los info BOx
Para separar un poco la colorkey (legend) de los plots, utilizar el list()
dentro del par.settings
de levelplot()
, del siguiente modo:
layout.heights = list(xlab.key.padding= 12)
Esto se ha hecho en los temas definidos al inicio y en el par setting del paisaje inicial
He creado una nueva folder con una réplica de la app y he includo algunos de los cambios que hemos acordado con Mario del PC para su correcta visualización sobre maqueta. Algunas de las cuestiones realizadas: