Customise the dimensions and background color of the visualisation.

globe_dimensions(globe, width = NULL, height = NULL)

globe_background(globe, color = "#000011")

Arguments

globe

An object of class globe as returned by create_globe, or an object of class globeProxy as returned by globeProxy.

width, height

An integer defining the number of pixels.

color

A valid hex code or color name.

Examples

# basic create_globe() %>% globe_img_url() %>% globe_dimensions(250, 250) %>% globe_background("#000") # use in shiny library(shiny) ui <- fluidPage( sliderInput( "width", "Change width", min = 300, max = 900, step = 50, value = 250 ), globeOutput("globe") ) server <- function(input, output){ output$globe <- renderGlobe({ create_globe() %>% globe_img_url() }) observeEvent(input$width, { globeProxy("globe") %>% globe_dimensions(width = input$width) }) }
# NOT RUN { shinyApp(ui, server) # }