createPlotView {iSPlot}R Documentation

Create a Plot View

Description

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.

Usage

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

Arguments

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

Value

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

Author(s)

Elizabeth Whalen

See Also

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

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
    # 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]