createPlotView {iSPlot}R Documentation

Create a Plot View


createPlotView calls a function based on the plotType, which then creates the actual plot. Currently, the only available plotType is "sPlotView", so only a scatterplot can be created. When the plotType is "sPlotView" the function, createSPlotView, is called.

createSPlotView creates an object of class sPlotView and calls scatterplot to create the actual plot. Then createSPlotView adds the button press and motion notify events to the drawing area.


createPlotView(win, dfName, plotType, ...)
createSPlotView(win, dfName, drArea, dfRows, dfColumns)


win the gtk window
dfName the data name, a character string
plotType the plot type, currently only "sPlotView" is available
... extra parameters needed for createSPlotView
drArea the gtk drawing area
dfRows the dataframe rows to be plotted
dfColumns the dataframe columns to be plotted, the first column will be the x values and the second column will be the y values


Both createPlotView and createSPlotView return a list with the following elements:

win the gtk window
newView the view object, which will be of type sPlotView


Elizabeth Whalen

See Also

createView, createDataView, scatterplot, sPlotView-class, clickEvent, motionEvent


  if (interactive())
    # should load data through Open Data or Open File under the File menu
    # plotting the data should occur through Plot Data under 
    # the Display menu
    # here you can see the extra parameters needed for the plot view
    createView(type = "plotView", dataName = "USArrests", 
               plotType = "sPlotView", dfRows = 1:nrow(USArrests), 
               dfColumns = 1:2) 
    # createView will call createPlotView, which will call createSPlotView

[Package iSPlot version 1.0.3 Index]