Package diffpy :: Package pdfgui :: Package control :: Module plotter :: Class Plotter :: Class Curve
[hide private]
[frames] | no frames]

Class Curve

source code

Curve stores the information for a curve in the plot

There are three ways of forming x and y data lists.
(1) r and g(r) from a single refinement are vectors by themselves
(2) A scalar data item (any item other than r and g(r)) can form a
vector if multiple timeSteps (refinement steps) are specified.
(3) A scalar data item (any item other than r and g(r)) can form a
vector if multiple refinement (multiple ids) are specified

name  -- The curve name
plotwnd -- The window where the curve is drawn
xStr -- Data name (string) for x axis
yStr -- Data name (string) for y axis
steps -- refinement step list
ids -- The list of object ids that the curve is related to
offset -- curve displacement in y direction
style --The drawing style of the curve
xData, yData -- data to be plotted
x, y -- original data for exporting (curve could be shifted)
bMultiData -- if the curve data comes from multiple data objects
bMultiStep -- if the curve data comes from multiple refinement step
ref -- reference of curve in the plot window
initialized -- if curve has been inserted
dataChanged -- if curve data has changed



Instance Methods [hide private]
 
__init__(self, name, plotwnd, xStr, yStr, steps, ids, offset, style)
initialize...
source code
 
validate(self)
validate(self) --> check if the curve is valid.
source code
 
register(self)
Register self as dataListener in control center...
source code
 
notify(self, changedIds=None, plotwnd=None)
notify Curve object certain data is updated...
source code
 
draw(self)
draw the curve in the graph.
source code
Method Details [hide private]

__init__(self, name, plotwnd, xStr, yStr, steps, ids, offset, style)
(Constructor)

source code 
initialize

name  -- The curve name
plotwnd -- The window where the curve is drawn
xStr -- Data name (string) for x axis
yStr -- Data name (string) for y axis
steps -- refinement step list
ids -- The list of object ids that the curve is related to
offset -- curve displacement in y direction
style --The drawing style of the curve

validate(self)

source code 
validate(self) --> check if  the curve is valid. Validity
is broken:
(1) when xStr or yStr doesn't refer to a legal vector
(2) when sizes of xStr and yStr don't match

register(self)

source code 
Register self as dataListener in control center
            

notify(self, changedIds=None, plotwnd=None)

source code 
notify Curve object certain data is updated

changedIds -- objects to which changed data is associated with

draw(self)

source code 
draw the curve in the graph. It will make sure the data is OK,
and plot to the screen.