askToReplot {iSPlot}R Documentation

Check that the user wants to redraw the active view


askToReplot opens a gtk window that asks the user if they want to replot the active view. If the user clicks the Yes button, then the active view will be redrawn and so will any other views that depend on the same data as the active view. So if the active view shows data from the dataframe, USArrests, then any other views that plot data from USArrests will also be redrawn. No changes will be made to the dataframe. askToReplot is called when the user chooses the menu item 'replot' under the edit menu. Note that if there are no views created, then replot will not be performed and a message box will open to let the user know that replot could not be performed.




Replotting the active view is useful if the user has used Find on the active scatterplot and thus, there is text on the scatterplot that the user wants to remove, but the user does not want to reset the dataframe to its original state (i.e. the user wants to keep the changes made to the dataframe).


Elizabeth Whalen

See Also



  if (interactive())
    # loading data should be performed through the menu item 'open data'
    # createView should be performed through the menu item 'plot data'
    createView(type = "plotView", dataName = "USArrests", 
               plotType = "sPlotView", dfRows = 1:nrow(USArrests), 
               dfColumns = 1:2) 
    # should choose 'replot' under edit menu to call askToReplot

[Package iSPlot version 1.0.3 Index]