sPlotView-class {iSPlot}R Documentation

Class "sPlotView": A class to represent a scatterplot view

Description

sPlotView is a class to represent a view that is a scatterplot. sPlotView inherits from the class, plotView, which inherits from the virtual class, genView.

Objects from the Class

Objects can be created by calls of the form new("sPlotView", ...).

Slots

dfRows:
the dataframe rows that are plotted, a numeric vector
colx:
the dataframe column plotted on the x axis, a numeric vector of length one
coly:
the dataframe column plotted on the y axis, a numeric vector of length one
plotDevice:
the plot device number
plotPar:
the parameter list for the plot, see par()
drArea:
an object of class "GtkDrawingArea"
dataName:
a character string describing what data is shown in the view
win:
an object of class "GtkWindow" that holds the view
winNum:
a number that tells what number view this is (for example, the first view created will have winNum=1)

Extends

Class "plotView", directly. Class "genView", by class "plotView".

Methods

clickEvent
Handles button press events on a scatterplot: identifies the point and creates and handles a gUpdateDataMessage object depending on the view mode
colx
Returns the colx slot
colx<-
Sets the colx slot
coly
Returns the coly slot
coly<-
Sets the coly slot
dfRows
Returns the dfRows slot
dfRows<-
Sets the dfRows slot
motionEvent
Handles motion notify events on a scatterplot: if the view mode is identify, it calls the function checkPoint, which identifies the point and creates and handles a gUpdateDataMessage object

Author(s)

Elizabeth Whalen

See Also

identifyPoint, checkPoint, genView-class, plotView-class, spreadView-class, gUpdateDataMessage-class

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
    createView(type = "plotView", dataName = "USArrests", 
               plotType = "sPlotView", dfRows = 1:nrow(USArrests), 
               dfColumns = 1:2) 
    # this will create an object of class, sPlotView
    is(get("viewList",viewEnv)[[1]],"sPlotView")  
  }

[Package iSPlot version 1.0.3 Index]