Loon's built-in object documentation. Can be used with every loon object that has plot states including plots, layers, navigators, contexts. This is a generic function.

l_info_states(target, states = "all")

Arguments

target

either an object of class loon or a vector that specifies the widget, layer, glyph, navigator or context completely. The widget is specified by the widget path name (e.g. '.l0.plot'), the remaining objects by their ids.

states

vector with names of states. 'all' is treated as a keyword and results in returning information on all plot states

Value

a named nested list with one element per state. The list elements are also named lists with type, dimension, defaultvalue, and description elements containing the respective information.

See also

Other loon interactive states: l_plot.default, l_plot, l_state_names, names.loon

Examples

p <- l_plot(iris, linkingGroup="iris") i <- l_info_states(p) names(p)
#> [1] "glyph" "itemLabel" "showItemLabels" "linkingGroup" #> [5] "linkingKey" "zoomX" "zoomY" "panX" #> [9] "panY" "deltaX" "deltaY" "xlabel" #> [13] "ylabel" "title" "showLabels" "showScales" #> [17] "swapAxes" "showGuides" "background" "foreground" #> [21] "guidesBackground" "guidelines" "minimumMargins" "labelMargins" #> [25] "scalesMargins" "x" "y" "xTemp" #> [29] "yTemp" "color" "selected" "active" #> [33] "size" "tag" "useLoonInspector" "selectBy" #> [37] "selectionLogic"
#> [1] "glyph" "itemLabel" "showItemLabels" "linkingGroup" #> [5] "linkingKey" "zoomX" "zoomY" "panX" #> [9] "panY" "deltaX" "deltaY" "xlabel" #> [13] "ylabel" "title" "showLabels" "showScales" #> [17] "swapAxes" "showGuides" "background" "foreground" #> [21] "guidesBackground" "guidelines" "minimumMargins" "labelMargins" #> [25] "scalesMargins" "x" "y" "xTemp" #> [29] "yTemp" "color" "selected" "active" #> [33] "size" "tag" "useLoonInspector" "selectBy" #> [37] "selectionLogic"
i$selectBy
#> $type #> [1] "factor" #> #> $dimension #> [1] "1" #> #> $defaultvalue #> [1] "sweeping" #> #> $description #> [1] "sweeping or brushing: interactive selection method" #>
l <- l_layer_rectangle(p, x=range(iris[,1]), y=range(iris[,2]), color="") l_info_states(l)
#> $x #> $x$type #> [1] "double" #> #> $x$dimension #> [1] "n" #> #> $x$defaultvalue #> [1] "" #> #> $x$description #> [1] "x coordinates" #> #> #> $y #> $y$type #> [1] "double" #> #> $y$dimension #> [1] "n" #> #> $y$defaultvalue #> [1] "" #> #> $y$description #> [1] "y coordinates" #> #> #> $tag #> $tag$type #> [1] "string" #> #> $tag$dimension #> [1] "any" #> #> $tag$defaultvalue #> [1] "" #> #> $tag$description #> [1] "tags useful for item bindings" #> #> #> $itemLabel #> $itemLabel$type #> [1] "string" #> #> $itemLabel$dimension #> [1] "any" #> #> $itemLabel$defaultvalue #> [1] "item" "label" #> #> $itemLabel$description #> [1] "?" #> #> #> $color #> $color$type #> [1] "colorOrTransparent" #> #> $color$dimension #> [1] "1" #> #> $color$defaultvalue #> [1] "" #> #> $color$description #> [1] "fill color of rectangle" #> #> #> $linecolor #> $linecolor$type #> [1] "colorOrTransparent" #> #> $linecolor$dimension #> [1] "1" #> #> $linecolor$defaultvalue #> [1] "steelblue" #> #> $linecolor$description #> [1] "outline colors of rectangle" #> #> #> $linewidth #> $linewidth$type #> [1] "positive_double" #> #> $linewidth$dimension #> [1] "1" #> #> $linewidth$defaultvalue #> [1] "1" #> #> $linewidth$description #> [1] "linewidth of outline" #> #>
h <- l_hist(iris$Sepal.Length, linkingGroup="iris") l_info_states(h)
#> $linkingGroup #> $linkingGroup$type #> [1] "string" #> #> $linkingGroup$dimension #> [1] "1" #> #> $linkingGroup$defaultvalue #> [1] "none" #> #> $linkingGroup$description #> [1] "?" #> #> #> $linkingKey #> $linkingKey$type #> [1] "?" #> #> $linkingKey$dimension #> [1] "-1" #> #> $linkingKey$defaultvalue #> [1] "?" #> #> $linkingKey$description #> [1] "?" #> #> #> $zoomX #> $zoomX$type #> [1] "positive_double" #> #> $zoomX$dimension #> [1] "1" #> #> $zoomX$defaultvalue #> [1] "1" #> #> $zoomX$description #> [1] "Data to plot region mapping is x_pr = (x_data-panX)/deltaX*zoomX if swapAxes=FALSE. The plot region is a plane defined by (0,0) and (1,1)." #> #> #> $zoomY #> $zoomY$type #> [1] "positive_double" #> #> $zoomY$dimension #> [1] "1" #> #> $zoomY$defaultvalue #> [1] "1" #> #> $zoomY$description #> [1] "Data to plot region mapping is y_pr = (y_data-panY)/deltaY*zoomY if swapAxes=FALSE. The plot region is a plane defined by (0,0) and (1,1)." #> #> #> $panX #> $panX$type #> [1] "double" #> #> $panX$dimension #> [1] "1" #> #> $panX$defaultvalue #> [1] "0" #> #> $panX$description #> [1] "panX is the visible x-axis origin" #> #> #> $panY #> $panY$type #> [1] "double" #> #> $panY$dimension #> [1] "1" #> #> $panY$defaultvalue #> [1] "0" #> #> $panY$description #> [1] "panY is the visible y-axis origin" #> #> #> $deltaX #> $deltaX$type #> [1] "positive_double" #> #> $deltaX$dimension #> [1] "1" #> #> $deltaX$defaultvalue #> [1] "1" #> #> $deltaX$description #> [1] "Data to plot region mapping is x_pr = (x_data-panX)/deltaX*zoomX if swapAxes=FALSE. The plot region is a plane defined by (0,0) and (1,1)." #> #> #> $deltaY #> $deltaY$type #> [1] "positive_double" #> #> $deltaY$dimension #> [1] "1" #> #> $deltaY$defaultvalue #> [1] "1" #> #> $deltaY$description #> [1] "Data to plot region mapping is y_pr = (y_data-panY)/deltaY*zoomY if swapAxes=FALSE. The plot region is a plane defined by (0,0) and (1,1)." #> #> #> $xlabel #> $xlabel$type #> [1] "string" #> #> $xlabel$dimension #> [1] "1" #> #> $xlabel$defaultvalue #> [1] "" #> #> $xlabel$description #> [1] "?" #> #> #> $ylabel #> $ylabel$type #> [1] "string" #> #> $ylabel$dimension #> [1] "1" #> #> $ylabel$defaultvalue #> [1] "" #> #> $ylabel$description #> [1] "?" #> #> #> $title #> $title$type #> [1] "string" #> #> $title$dimension #> [1] "1" #> #> $title$defaultvalue #> [1] "" #> #> $title$description #> [1] "plot title" #> #> #> $showLabels #> $showLabels$type #> [1] "boolean" #> #> $showLabels$dimension #> [1] "1" #> #> $showLabels$defaultvalue #> [1] "TRUE" #> #> $showLabels$description #> [1] "boolean to specify whether to display the axes labels and title or not" #> #> #> $showScales #> $showScales$type #> [1] "boolean" #> #> $showScales$dimension #> [1] "1" #> #> $showScales$defaultvalue #> [1] "FALSE" #> #> $showScales$description #> [1] "boolean to specify whether to display the scales or not" #> #> #> $swapAxes #> $swapAxes$type #> [1] "boolean" #> #> $swapAxes$dimension #> [1] "1" #> #> $swapAxes$defaultvalue #> [1] "FALSE" #> #> $swapAxes$description #> [1] "boolean for swapping the x and y axes" #> #> #> $showGuides #> $showGuides$type #> [1] "boolean" #> #> $showGuides$dimension #> [1] "1" #> #> $showGuides$defaultvalue #> [1] "FALSE" #> #> $showGuides$description #> [1] "guides a horizontal and vertical lines for visual guidance" #> #> #> $background #> $background$type #> [1] "color" #> #> $background$dimension #> [1] "1" #> #> $background$defaultvalue #> [1] "white" #> #> $background$description #> [1] "background color of plot" #> #> #> $foreground #> $foreground$type #> [1] "color" #> #> $foreground$dimension #> [1] "1" #> #> $foreground$defaultvalue #> [1] "black" #> #> $foreground$description #> [1] "foreground color of plot including label, axes and scales color" #> #> #> $guidesBackground #> $guidesBackground$type #> [1] "color" #> #> $guidesBackground$dimension #> [1] "1" #> #> $guidesBackground$defaultvalue #> [1] "gray92" #> #> $guidesBackground$description #> [1] "background color if showGuides=TRUE" #> #> #> $guidelines #> $guidelines$type #> [1] "color" #> #> $guidelines$dimension #> [1] "1" #> #> $guidelines$defaultvalue #> [1] "white" #> #> $guidelines$description #> [1] "guidelines color" #> #> #> $minimumMargins #> $minimumMargins$type #> [1] "positive_integer" #> #> $minimumMargins$dimension #> [1] "4" #> #> $minimumMargins$defaultvalue #> [1] "20" "20" "20" "20" #> #> $minimumMargins$description #> [1] "bottom, left, top, right minimum margin in pixels" #> #> #> $labelMargins #> $labelMargins$type #> [1] "positive_integer" #> #> $labelMargins$dimension #> [1] "4" #> #> $labelMargins$defaultvalue #> [1] "30" "30" "60" "0" #> #> $labelMargins$description #> [1] "bottom, left, top, right margins for labels in pixels" #> #> #> $scalesMargins #> $scalesMargins$type #> [1] "positive_integer" #> #> $scalesMargins$dimension #> [1] "4" #> #> $scalesMargins$defaultvalue #> [1] "30" "80" "0" "0" #> #> $scalesMargins$description #> [1] "bottom, left, top, right margins for scales in pixels" #> #> #> $default_ylabels #> $default_ylabels$type #> [1] "string" #> #> $default_ylabels$dimension #> [1] "3" #> #> $default_ylabels$defaultvalue #> [1] "Frequency" "Density" #> [3] "Conditional Probability" #> #> $default_ylabels$description #> [1] "?" #> #> #> $x #> $x$type #> [1] "double" #> #> $x$dimension #> [1] "n" #> #> $x$defaultvalue #> [1] "" #> #> $x$description #> [1] "data used for binning" #> #> #> $binwidth #> $binwidth$type #> [1] "positive_double" #> #> $binwidth$dimension #> [1] "1" #> #> $binwidth$defaultvalue #> [1] "1" #> #> $binwidth$description #> [1] "bin-width used for binning algorithm" #> #> #> $origin #> $origin$type #> [1] "double" #> #> $origin$dimension #> [1] "1" #> #> $origin$defaultvalue #> [1] "0" #> #> $origin$description #> [1] "origin used for binning algorithm" #> #> #> $showBinHandle #> $showBinHandle$type #> [1] "boolean" #> #> $showBinHandle$dimension #> [1] "1" #> #> $showBinHandle$defaultvalue #> [1] "TRUE" #> #> $showBinHandle$description #> [1] "boolean to specify whether to show the bin-handle or not" #> #> #> $yshows #> $yshows$type #> [1] "factor" #> #> $yshows$dimension #> [1] "1" #> #> $yshows$defaultvalue #> [1] "frequency" #> #> $yshows$description #> [1] "either 'frequency' (i.e. counts) or density" #> #> #> $colorStackingOrder #> $colorStackingOrder$type #> [1] "?" #> #> $colorStackingOrder$dimension #> [1] "-1" #> #> $colorStackingOrder$defaultvalue #> [1] "?" #> #> $colorStackingOrder$description #> [1] "if showStackedColors=TRUE then the histograms are stacked according to the colors in this list. 'selected' is a keyword and refers to the selected points. If a color is not in this list then their corresponding histograms get stacked according to their order of appearance in the color state." #> #> #> $showOutlines #> $showOutlines$type #> [1] "boolean" #> #> $showOutlines$dimension #> [1] "1" #> #> $showOutlines$defaultvalue #> [1] "TRUE" #> #> $showOutlines$description #> [1] "boolean to specify whether to show outlines for histogram bars or not" #> #> #> $showStackedColors #> $showStackedColors$type #> [1] "boolean" #> #> $showStackedColors$dimension #> [1] "1" #> #> $showStackedColors$defaultvalue #> [1] "FALSE" #> #> $showStackedColors$description #> [1] "boolean to specify whether the color state should be encoded or not" #> #> #> $colorFill #> $colorFill$type #> [1] "color" #> #> $colorFill$dimension #> [1] "1" #> #> $colorFill$defaultvalue #> [1] "thistle" #> #> $colorFill$description #> [1] "if showStackedColors=FALSE then this is the base color used for the histogram bins" #> #> #> $colorOutline #> $colorOutline$type #> [1] "color" #> #> $colorOutline$dimension #> [1] "1" #> #> $colorOutline$defaultvalue #> [1] "black" #> #> $colorOutline$description #> [1] "if showOutlines=TRUE then this color is used as the outline color" #> #> #> $color #> $color$type #> [1] "color" #> #> $color$dimension #> [1] "n" #> #> $color$defaultvalue #> [1] "lightgrey" #> #> $color$description #> [1] "colors of the points" #> #> #> $selected #> $selected$type #> [1] "boolean" #> #> $selected$dimension #> [1] "n" #> #> $selected$defaultvalue #> [1] "FALSE" #> #> $selected$description #> [1] "selected points are highlighted and can be modified with the inspector" #> #> #> $active #> $active$type #> [1] "boolean" #> #> $active$dimension #> [1] "n" #> #> $active$defaultvalue #> [1] "TRUE" #> #> $active$description #> [1] "active points get included in the binning, inactive ones do not" #> #> #> $selectBy #> $selectBy$type #> [1] "factor" #> #> $selectBy$dimension #> [1] "1" #> #> $selectBy$defaultvalue #> [1] "sweeping" #> #> $selectBy$description #> [1] "sweeping or brushing: interactive selection method" #> #> #> $selectionLogic #> $selectionLogic$type #> [1] "factor" #> #> $selectionLogic$dimension #> [1] "1" #> #> $selectionLogic$defaultvalue #> [1] "select" #> #> $selectionLogic$description #> [1] "select, deselect or invert: logic for selection" #> #> #> $useLoonInspector #> $useLoonInspector$type #> [1] "boolean" #> #> $useLoonInspector$dimension #> [1] "1" #> #> $useLoonInspector$defaultvalue #> [1] "TRUE" #> #> $useLoonInspector$description #> [1] "boolean to specify whether to report interaction events to the loon inspector or not" #> #>