setInvertedAxes: Axis orientation

View source: R/parallelPlot.R

setInvertedAxesR Documentation

Axis orientation

Description

Tells which axes have to be displayed with an inverted orientation.

Usage

setInvertedAxes(id, invertedAxes)

Arguments

id

output variable to read from (id which references the requested plot)

invertedAxes

Vector of boolean (one for each data column), TRUE if axis orientation must be inverted; NULL is allowed, meaning no axis must be inverted. A named list can also be provided to only indicate which axes must be assigned to a new orientation.

Value

No return value, called from shiny applications for side effects.

Examples

 if(interactive() && require(shiny)) {
   library(shiny)
   library(parallelPlot)

   ui <- fluidPage(
       checkboxInput("orientationCB", "Axis orientation", FALSE),
       p("The check box controls the orientation of axes"),
       parallelPlotOutput("parPlot")
   )

   server <- function(input, output, session) {
       output$parPlot <- renderParallelPlot({
           parallelPlot(iris)
       })
       observeEvent(input$orientationCB, {
           invertedAxes <- rep(input$orientationCB, ncol(iris))
           parallelPlot::setInvertedAxes("parPlot", invertedAxes)
       })
   }

   shinyApp(ui, server)
 }


parallelPlot documentation built on April 19, 2023, 1:07 a.m.