getActivePlot {iSPlot} | R Documentation |
getActivePlot determines which plot is active based on which device is active and it returns the plotView object that corresponds to this plot. getPlotByDev gets the active plot by the device number. getPlotNumber gives the index in viewList of the active device. getPlotDev makes a vector of the device elements in viewList. So these four functions work together to return the plotView object that corresponds with the active plot.
getActivePlot() getPlotByDev(curDev) getPlotNumber(curDev) getPlotDev(viewList)
curDev |
the active device |
viewList |
viewList in viewEnv |
getActivePlot calls getPlotByDev, getPlotByDev calls getPlotNumber, and getPlotNumber calls getPlotDev.
getActivePlot returns the plotView object that corresponds with the active plot. getPlotByDev also returns the plotView object that corresponds with the active plot. getPlotNumber returns the index in viewList of the active device. getPlotDev returns a vector of all devices in viewList.
Elizabeth Whalen
updatePlots
,
createSPlotView
,
checkPoint
if (interactive()) { createControlWindow() # should load data through Open Data or Open File under the File menu data(USArrests) loadDFData(USArrests,"USArrests") # plotting the data should occur through Plot Data under # the Display menu createView(type = "plotView", dataName = "USArrests", plotType = "sPlotView", dfRows = 1:nrow(USArrests), dfColumns = 1:2) # x will be of type sPlotView x<-getActivePlot() print(class(x)) print(colx(x)) print(coly(x)) createView(type = "plotView", dataName = "USArrests", plotType = "sPlotView", dfRows = 1:nrow(USArrests), dfColumns = 3:4) x<-getActivePlot() print(colx(x)) print(coly(x)) }