createPlotView {iSPlot} | R Documentation |
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 the new view object.
Elizabeth Whalen
createView
,
createDataView
,
scatterplot
,
sPlotView-class
,
clickEvent
,
motionEvent
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 }