| replot {iSPlot} | R Documentation |
replot tells a plot to redraw itself because the data has changed. replot is called when the type of change to the data set was either add or reset. replot calls the original plotting function, scatterplot, to do the plotting. Once the plot has been redrawn, replot updates viewList with the new sPlotView object returned from scatterplot.
replot(plotIndex)
plotIndex |
the list index in viewList of the plot that needs to be replotted |
Elizabeth Whalen
scatterplot,
updatePoints,
sPlotView-class
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"))
# updateViews will create a gUpdateViewMessage and call the
# handleMessage method, which will call updatePoints because the
# type is modify
updateViews(dfName="USArrests", type="modify",
rowName=c("Massachusetts","Ohio"))
# should perform reset using Reset under the Edit menu
reset("USArrests")
# updateViews will create a gUpdateViewMessage and call the
# handleMessage method, which will call replot because the
# type is reset
updateViews(dfName="USArrests",type="reset")
}