| updatePoints {iSPlot} | R Documentation |
updatePoints replots only certain points on a plot, rather than replotting the whole plot. updatePoints is called when the type of change performed on the dataframe was either modify or delete.
updatePoints(plotIndex, Rname)
plotIndex |
the index of the plot to be updated in viewList in viewEnv |
Rname |
the row name or index that changed - this may be a vector of length greater than or equal to one |
Elizabeth Whalen
gUpdateViewMessage-class,
replot
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)
# should modify using the control window (by choosing the view mode and
# then clicking on a plot)
# by interacting with a plot when the view mode is color, these
# functions will be called automatically
modify("USArrests", Rname=c("Massachusetts","Ohio"),
Cname=c("color","color"), data=c("red","green"))
# create an update view message and then dispatch it so the points
# that have changed will be replot
plMessage<-new("gUpdateViewMessage",type="modify",Rname=c("Massachusetts",
"Ohio"))
handleMessage(plMessage,dataName="USArrests")
}