updatePlots {iSPlot}R Documentation

Update any Views that are Plots

Description

updatePlots is called by the handleMessage method for a gUpdateViewMessage object. Currently, it calls updateSPlots to update scatterplot views, but if new types of plots are created, another function could also be called here to update the new plot type. updateSPlots calls either updatePoints or replot, depending on what type of change was performed on the data and thus, what type of update the plot needs. updateSPlots loops through all scatterplots that need to be updated and for each, it calls either updatePoints or replot.

Usage

updatePlots(type, plotIndex, data)
updateSPlots(type, plotIndex, data)

Arguments

type the type of update the plot needs, either "updatePoints" or "replot"
plotIndex the index of the plot in the environment variable, viewList
data the row names to be updated

Author(s)

Elizabeth Whalen

See Also

gUpdateViewMessage-class, updatePoints, replot

Examples

  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)  
    # now set the view mode
    setHighlightMode()

    # now click on a point on the plot and that will cause updatePlots
    # to be called - you can tell it was called because the data and
    # thus, the plot will change  
  }

[Package iSPlot version 1.0.3 Index]