Bugfix: Malformed tables.
All argument lists with `**Arguments:**`
This commit is contained in:
parent
2279775244
commit
2a13994a2a
@ -47,27 +47,27 @@ class ArrowItem(QtGui.QGraphicsPathItem):
|
|||||||
Changes the appearance of the arrow.
|
Changes the appearance of the arrow.
|
||||||
All arguments are optional:
|
All arguments are optional:
|
||||||
|
|
||||||
================= =================================================
|
====================== =================================================
|
||||||
**Keyword Arguments:**
|
**Keyword**
|
||||||
angle Orientation of the arrow in degrees. Default is
|
angle Orientation of the arrow in degrees. Default is
|
||||||
0; arrow pointing to the left.
|
0; arrow pointing to the left.
|
||||||
headLen Length of the arrow head, from tip to base.
|
headLen Length of the arrow head, from tip to base.
|
||||||
default=20
|
default=20
|
||||||
headWidth Width of the arrow head at its base.
|
headWidth Width of the arrow head at its base.
|
||||||
tipAngle Angle of the tip of the arrow in degrees. Smaller
|
tipAngle Angle of the tip of the arrow in degrees. Smaller
|
||||||
values make a 'sharper' arrow. If tipAngle is
|
values make a 'sharper' arrow. If tipAngle is
|
||||||
specified, ot overrides headWidth. default=25
|
specified, ot overrides headWidth. default=25
|
||||||
baseAngle Angle of the base of the arrow head. Default is
|
baseAngle Angle of the base of the arrow head. Default is
|
||||||
0, which means that the base of the arrow head
|
0, which means that the base of the arrow head
|
||||||
is perpendicular to the arrow tail.
|
is perpendicular to the arrow tail.
|
||||||
tailLen Length of the arrow tail, measured from the base
|
tailLen Length of the arrow tail, measured from the base
|
||||||
of the arrow head to the end of the tail. If
|
of the arrow head to the end of the tail. If
|
||||||
this value is None, no tail will be drawn.
|
this value is None, no tail will be drawn.
|
||||||
default=None
|
default=None
|
||||||
tailWidth Width of the tail. default=3
|
tailWidth Width of the tail. default=3
|
||||||
pen The pen used to draw the outline of the arrow.
|
pen The pen used to draw the outline of the arrow.
|
||||||
brush The brush used to fill the arrow.
|
brush The brush used to fill the arrow.
|
||||||
================= =================================================
|
====================== =================================================
|
||||||
"""
|
"""
|
||||||
self.opts.update(opts)
|
self.opts.update(opts)
|
||||||
|
|
||||||
|
@ -156,17 +156,17 @@ class AxisItem(GraphicsWidget):
|
|||||||
def setLabel(self, text=None, units=None, unitPrefix=None, **args):
|
def setLabel(self, text=None, units=None, unitPrefix=None, **args):
|
||||||
"""Set the text displayed adjacent to the axis.
|
"""Set the text displayed adjacent to the axis.
|
||||||
|
|
||||||
============= =============================================================
|
============== =============================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
text The text (excluding units) to display on the label for this
|
text The text (excluding units) to display on the label for this
|
||||||
axis.
|
axis.
|
||||||
units The units for this axis. Units should generally be given
|
units The units for this axis. Units should generally be given
|
||||||
without any scaling prefix (eg, 'V' instead of 'mV'). The
|
without any scaling prefix (eg, 'V' instead of 'mV'). The
|
||||||
scaling prefix will be automatically prepended based on the
|
scaling prefix will be automatically prepended based on the
|
||||||
range of data displayed.
|
range of data displayed.
|
||||||
**args All extra keyword arguments become CSS style options for
|
**args All extra keyword arguments become CSS style options for
|
||||||
the <span> tag which will surround the axis label and units.
|
the <span> tag which will surround the axis label and units.
|
||||||
============= =============================================================
|
============== =============================================================
|
||||||
|
|
||||||
The final text generated for the label will look like::
|
The final text generated for the label will look like::
|
||||||
|
|
||||||
|
@ -35,14 +35,14 @@ class TickSliderItem(GraphicsWidget):
|
|||||||
|
|
||||||
def __init__(self, orientation='bottom', allowAdd=True, **kargs):
|
def __init__(self, orientation='bottom', allowAdd=True, **kargs):
|
||||||
"""
|
"""
|
||||||
============= =================================================================================
|
============== =================================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
orientation Set the orientation of the gradient. Options are: 'left', 'right'
|
orientation Set the orientation of the gradient. Options are: 'left', 'right'
|
||||||
'top', and 'bottom'.
|
'top', and 'bottom'.
|
||||||
allowAdd Specifies whether ticks can be added to the item by the user.
|
allowAdd Specifies whether ticks can be added to the item by the user.
|
||||||
tickPen Default is white. Specifies the color of the outline of the ticks.
|
tickPen Default is white. Specifies the color of the outline of the ticks.
|
||||||
Can be any of the valid arguments for :func:`mkPen <pyqtgraph.mkPen>`
|
Can be any of the valid arguments for :func:`mkPen <pyqtgraph.mkPen>`
|
||||||
============= =================================================================================
|
============== =================================================================================
|
||||||
"""
|
"""
|
||||||
## public
|
## public
|
||||||
GraphicsWidget.__init__(self)
|
GraphicsWidget.__init__(self)
|
||||||
@ -103,13 +103,13 @@ class TickSliderItem(GraphicsWidget):
|
|||||||
## public
|
## public
|
||||||
"""Set the orientation of the TickSliderItem.
|
"""Set the orientation of the TickSliderItem.
|
||||||
|
|
||||||
============= ===================================================================
|
============== ===================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
orientation Options are: 'left', 'right', 'top', 'bottom'
|
orientation Options are: 'left', 'right', 'top', 'bottom'
|
||||||
The orientation option specifies which side of the slider the
|
The orientation option specifies which side of the slider the
|
||||||
ticks are on, as well as whether the slider is vertical ('right'
|
ticks are on, as well as whether the slider is vertical ('right'
|
||||||
and 'left') or horizontal ('top' and 'bottom').
|
and 'left') or horizontal ('top' and 'bottom').
|
||||||
============= ===================================================================
|
============== ===================================================================
|
||||||
"""
|
"""
|
||||||
self.orientation = orientation
|
self.orientation = orientation
|
||||||
self.setMaxDim()
|
self.setMaxDim()
|
||||||
@ -136,13 +136,13 @@ class TickSliderItem(GraphicsWidget):
|
|||||||
"""
|
"""
|
||||||
Add a tick to the item.
|
Add a tick to the item.
|
||||||
|
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
x Position where tick should be added.
|
x Position where tick should be added.
|
||||||
color Color of added tick. If color is not specified, the color will be
|
color Color of added tick. If color is not specified, the color will be
|
||||||
white.
|
white.
|
||||||
movable Specifies whether the tick is movable with the mouse.
|
movable Specifies whether the tick is movable with the mouse.
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if color is None:
|
if color is None:
|
||||||
@ -265,14 +265,14 @@ class TickSliderItem(GraphicsWidget):
|
|||||||
def setTickColor(self, tick, color):
|
def setTickColor(self, tick, color):
|
||||||
"""Set the color of the specified tick.
|
"""Set the color of the specified tick.
|
||||||
|
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
tick Can be either an integer corresponding to the index of the tick
|
tick Can be either an integer corresponding to the index of the tick
|
||||||
or a Tick object. Ex: if you had a slider with 3 ticks and you
|
or a Tick object. Ex: if you had a slider with 3 ticks and you
|
||||||
wanted to change the middle tick, the index would be 1.
|
wanted to change the middle tick, the index would be 1.
|
||||||
color The color to make the tick. Can be any argument that is valid for
|
color The color to make the tick. Can be any argument that is valid for
|
||||||
:func:`mkBrush <pyqtgraph.mkBrush>`
|
:func:`mkBrush <pyqtgraph.mkBrush>`
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
"""
|
"""
|
||||||
tick = self.getTick(tick)
|
tick = self.getTick(tick)
|
||||||
tick.color = color
|
tick.color = color
|
||||||
@ -284,14 +284,14 @@ class TickSliderItem(GraphicsWidget):
|
|||||||
"""
|
"""
|
||||||
Set the position (along the slider) of the tick.
|
Set the position (along the slider) of the tick.
|
||||||
|
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
tick Can be either an integer corresponding to the index of the tick
|
tick Can be either an integer corresponding to the index of the tick
|
||||||
or a Tick object. Ex: if you had a slider with 3 ticks and you
|
or a Tick object. Ex: if you had a slider with 3 ticks and you
|
||||||
wanted to change the middle tick, the index would be 1.
|
wanted to change the middle tick, the index would be 1.
|
||||||
val The desired position of the tick. If val is < 0, position will be
|
val The desired position of the tick. If val is < 0, position will be
|
||||||
set to 0. If val is > 1, position will be set to 1.
|
set to 0. If val is > 1, position will be set to 1.
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
"""
|
"""
|
||||||
tick = self.getTick(tick)
|
tick = self.getTick(tick)
|
||||||
val = min(max(0.0, val), 1.0)
|
val = min(max(0.0, val), 1.0)
|
||||||
@ -305,12 +305,12 @@ class TickSliderItem(GraphicsWidget):
|
|||||||
## public
|
## public
|
||||||
"""Return the value (from 0.0 to 1.0) of the specified tick.
|
"""Return the value (from 0.0 to 1.0) of the specified tick.
|
||||||
|
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
tick Can be either an integer corresponding to the index of the tick
|
tick Can be either an integer corresponding to the index of the tick
|
||||||
or a Tick object. Ex: if you had a slider with 3 ticks and you
|
or a Tick object. Ex: if you had a slider with 3 ticks and you
|
||||||
wanted the value of the middle tick, the index would be 1.
|
wanted the value of the middle tick, the index would be 1.
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
"""
|
"""
|
||||||
tick = self.getTick(tick)
|
tick = self.getTick(tick)
|
||||||
return self.ticks[tick]
|
return self.ticks[tick]
|
||||||
@ -319,11 +319,11 @@ class TickSliderItem(GraphicsWidget):
|
|||||||
## public
|
## public
|
||||||
"""Return the Tick object at the specified index.
|
"""Return the Tick object at the specified index.
|
||||||
|
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
tick An integer corresponding to the index of the desired tick. If the
|
tick An integer corresponding to the index of the desired tick. If the
|
||||||
argument is not an integer it will be returned unchanged.
|
argument is not an integer it will be returned unchanged.
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
"""
|
"""
|
||||||
if type(tick) is int:
|
if type(tick) is int:
|
||||||
tick = self.listTicks()[tick][0]
|
tick = self.listTicks()[tick][0]
|
||||||
@ -366,14 +366,14 @@ class GradientEditorItem(TickSliderItem):
|
|||||||
Create a new GradientEditorItem.
|
Create a new GradientEditorItem.
|
||||||
All arguments are passed to :func:`TickSliderItem.__init__ <pyqtgraph.TickSliderItem.__init__>`
|
All arguments are passed to :func:`TickSliderItem.__init__ <pyqtgraph.TickSliderItem.__init__>`
|
||||||
|
|
||||||
============= =================================================================================
|
=============== =================================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
orientation Set the orientation of the gradient. Options are: 'left', 'right'
|
orientation Set the orientation of the gradient. Options are: 'left', 'right'
|
||||||
'top', and 'bottom'.
|
'top', and 'bottom'.
|
||||||
allowAdd Default is True. Specifies whether ticks can be added to the item.
|
allowAdd Default is True. Specifies whether ticks can be added to the item.
|
||||||
tickPen Default is white. Specifies the color of the outline of the ticks.
|
tickPen Default is white. Specifies the color of the outline of the ticks.
|
||||||
Can be any of the valid arguments for :func:`mkPen <pyqtgraph.mkPen>`
|
Can be any of the valid arguments for :func:`mkPen <pyqtgraph.mkPen>`
|
||||||
============= =================================================================================
|
=============== =================================================================================
|
||||||
"""
|
"""
|
||||||
self.currentTick = None
|
self.currentTick = None
|
||||||
self.currentTickColor = None
|
self.currentTickColor = None
|
||||||
@ -445,13 +445,13 @@ class GradientEditorItem(TickSliderItem):
|
|||||||
"""
|
"""
|
||||||
Set the orientation of the GradientEditorItem.
|
Set the orientation of the GradientEditorItem.
|
||||||
|
|
||||||
============= ===================================================================
|
============== ===================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
orientation Options are: 'left', 'right', 'top', 'bottom'
|
orientation Options are: 'left', 'right', 'top', 'bottom'
|
||||||
The orientation option specifies which side of the gradient the
|
The orientation option specifies which side of the gradient the
|
||||||
ticks are on, as well as whether the gradient is vertical ('right'
|
ticks are on, as well as whether the gradient is vertical ('right'
|
||||||
and 'left') or horizontal ('top' and 'bottom').
|
and 'left') or horizontal ('top' and 'bottom').
|
||||||
============= ===================================================================
|
============== ===================================================================
|
||||||
"""
|
"""
|
||||||
TickSliderItem.setOrientation(self, orientation)
|
TickSliderItem.setOrientation(self, orientation)
|
||||||
self.translate(0, self.rectSize)
|
self.translate(0, self.rectSize)
|
||||||
@ -588,11 +588,11 @@ class GradientEditorItem(TickSliderItem):
|
|||||||
"""
|
"""
|
||||||
Return a color for a given value.
|
Return a color for a given value.
|
||||||
|
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
x Value (position on gradient) of requested color.
|
x Value (position on gradient) of requested color.
|
||||||
toQColor If true, returns a QColor object, else returns a (r,g,b,a) tuple.
|
toQColor If true, returns a QColor object, else returns a (r,g,b,a) tuple.
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
"""
|
"""
|
||||||
ticks = self.listTicks()
|
ticks = self.listTicks()
|
||||||
if x <= ticks[0][1]:
|
if x <= ticks[0][1]:
|
||||||
@ -648,12 +648,12 @@ class GradientEditorItem(TickSliderItem):
|
|||||||
"""
|
"""
|
||||||
Return an RGB(A) lookup table (ndarray).
|
Return an RGB(A) lookup table (ndarray).
|
||||||
|
|
||||||
============= ============================================================================
|
============== ============================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
nPts The number of points in the returned lookup table.
|
nPts The number of points in the returned lookup table.
|
||||||
alpha True, False, or None - Specifies whether or not alpha values are included
|
alpha True, False, or None - Specifies whether or not alpha values are included
|
||||||
in the table.If alpha is None, alpha will be automatically determined.
|
in the table.If alpha is None, alpha will be automatically determined.
|
||||||
============= ============================================================================
|
============== ============================================================================
|
||||||
"""
|
"""
|
||||||
if alpha is None:
|
if alpha is None:
|
||||||
alpha = self.usesAlpha()
|
alpha = self.usesAlpha()
|
||||||
@ -702,13 +702,13 @@ class GradientEditorItem(TickSliderItem):
|
|||||||
"""
|
"""
|
||||||
Add a tick to the gradient. Return the tick.
|
Add a tick to the gradient. Return the tick.
|
||||||
|
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
x Position where tick should be added.
|
x Position where tick should be added.
|
||||||
color Color of added tick. If color is not specified, the color will be
|
color Color of added tick. If color is not specified, the color will be
|
||||||
the color of the gradient at the specified position.
|
the color of the gradient at the specified position.
|
||||||
movable Specifies whether the tick is movable with the mouse.
|
movable Specifies whether the tick is movable with the mouse.
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
@ -748,16 +748,16 @@ class GradientEditorItem(TickSliderItem):
|
|||||||
"""
|
"""
|
||||||
Restore the gradient specified in state.
|
Restore the gradient specified in state.
|
||||||
|
|
||||||
============= ====================================================================
|
============== ====================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
state A dictionary with same structure as those returned by
|
state A dictionary with same structure as those returned by
|
||||||
:func:`saveState <pyqtgraph.GradientEditorItem.saveState>`
|
:func:`saveState <pyqtgraph.GradientEditorItem.saveState>`
|
||||||
|
|
||||||
Keys must include:
|
Keys must include:
|
||||||
|
|
||||||
- 'mode': hsv or rgb
|
- 'mode': hsv or rgb
|
||||||
- 'ticks': a list of tuples (pos, (r,g,b,a))
|
- 'ticks': a list of tuples (pos, (r,g,b,a))
|
||||||
============= ====================================================================
|
============== ====================================================================
|
||||||
"""
|
"""
|
||||||
## public
|
## public
|
||||||
self.setColorMode(state['mode'])
|
self.setColorMode(state['mode'])
|
||||||
|
@ -28,29 +28,29 @@ class GraphItem(GraphicsObject):
|
|||||||
"""
|
"""
|
||||||
Change the data displayed by the graph.
|
Change the data displayed by the graph.
|
||||||
|
|
||||||
============ =========================================================
|
============== =========================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
pos (N,2) array of the positions of each node in the graph.
|
pos (N,2) array of the positions of each node in the graph.
|
||||||
adj (M,2) array of connection data. Each row contains indexes
|
adj (M,2) array of connection data. Each row contains indexes
|
||||||
of two nodes that are connected.
|
of two nodes that are connected.
|
||||||
pen The pen to use when drawing lines between connected
|
pen The pen to use when drawing lines between connected
|
||||||
nodes. May be one of:
|
nodes. May be one of:
|
||||||
|
|
||||||
* QPen
|
* QPen
|
||||||
* a single argument to pass to pg.mkPen
|
* a single argument to pass to pg.mkPen
|
||||||
* a record array of length M
|
* a record array of length M
|
||||||
with fields (red, green, blue, alpha, width). Note
|
with fields (red, green, blue, alpha, width). Note
|
||||||
that using this option may have a significant performance
|
that using this option may have a significant performance
|
||||||
cost.
|
cost.
|
||||||
* None (to disable connection drawing)
|
* None (to disable connection drawing)
|
||||||
* 'default' to use the default foreground color.
|
* 'default' to use the default foreground color.
|
||||||
|
|
||||||
symbolPen The pen used for drawing nodes.
|
symbolPen The pen used for drawing nodes.
|
||||||
``**opts`` All other keyword arguments are given to
|
``**opts`` All other keyword arguments are given to
|
||||||
:func:`ScatterPlotItem.setData() <pyqtgraph.ScatterPlotItem.setData>`
|
:func:`ScatterPlotItem.setData() <pyqtgraph.ScatterPlotItem.setData>`
|
||||||
to affect the appearance of nodes (symbol, size, brush,
|
to affect the appearance of nodes (symbol, size, brush,
|
||||||
etc.)
|
etc.)
|
||||||
============ =========================================================
|
============== =========================================================
|
||||||
"""
|
"""
|
||||||
if 'adj' in kwds:
|
if 'adj' in kwds:
|
||||||
self.adjacency = kwds.pop('adj')
|
self.adjacency = kwds.pop('adj')
|
||||||
|
@ -28,18 +28,18 @@ class InfiniteLine(GraphicsObject):
|
|||||||
|
|
||||||
def __init__(self, pos=None, angle=90, pen=None, movable=False, bounds=None):
|
def __init__(self, pos=None, angle=90, pen=None, movable=False, bounds=None):
|
||||||
"""
|
"""
|
||||||
============= ==================================================================
|
============== ==================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
pos Position of the line. This can be a QPointF or a single value for
|
pos Position of the line. This can be a QPointF or a single value for
|
||||||
vertical/horizontal lines.
|
vertical/horizontal lines.
|
||||||
angle Angle of line in degrees. 0 is horizontal, 90 is vertical.
|
angle Angle of line in degrees. 0 is horizontal, 90 is vertical.
|
||||||
pen Pen to use when drawing line. Can be any arguments that are valid
|
pen Pen to use when drawing line. Can be any arguments that are valid
|
||||||
for :func:`mkPen <pyqtgraph.mkPen>`. Default pen is transparent
|
for :func:`mkPen <pyqtgraph.mkPen>`. Default pen is transparent
|
||||||
yellow.
|
yellow.
|
||||||
movable If True, the line can be dragged to a new position by the user.
|
movable If True, the line can be dragged to a new position by the user.
|
||||||
bounds Optional [min, max] bounding values. Bounds are only valid if the
|
bounds Optional [min, max] bounding values. Bounds are only valid if the
|
||||||
line is vertical or horizontal.
|
line is vertical or horizontal.
|
||||||
============= ==================================================================
|
============= ==================================================================
|
||||||
"""
|
"""
|
||||||
|
|
||||||
GraphicsObject.__init__(self)
|
GraphicsObject.__init__(self)
|
||||||
|
@ -18,14 +18,14 @@ class IsocurveItem(GraphicsObject):
|
|||||||
"""
|
"""
|
||||||
Create a new isocurve item.
|
Create a new isocurve item.
|
||||||
|
|
||||||
============= ===============================================================
|
============== ===============================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
data A 2-dimensional ndarray. Can be initialized as None, and set
|
data A 2-dimensional ndarray. Can be initialized as None, and set
|
||||||
later using :func:`setData <pyqtgraph.IsocurveItem.setData>`
|
later using :func:`setData <pyqtgraph.IsocurveItem.setData>`
|
||||||
level The cutoff value at which to draw the isocurve.
|
level The cutoff value at which to draw the isocurve.
|
||||||
pen The color of the curve item. Can be anything valid for
|
pen The color of the curve item. Can be anything valid for
|
||||||
:func:`mkPen <pyqtgraph.mkPen>`
|
:func:`mkPen <pyqtgraph.mkPen>`
|
||||||
============= ===============================================================
|
============== ===============================================================
|
||||||
"""
|
"""
|
||||||
GraphicsObject.__init__(self)
|
GraphicsObject.__init__(self)
|
||||||
|
|
||||||
@ -45,12 +45,12 @@ class IsocurveItem(GraphicsObject):
|
|||||||
"""
|
"""
|
||||||
Set the data/image to draw isocurves for.
|
Set the data/image to draw isocurves for.
|
||||||
|
|
||||||
============= ========================================================================
|
============== ========================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
data A 2-dimensional ndarray.
|
data A 2-dimensional ndarray.
|
||||||
level The cutoff value at which to draw the curve. If level is not specified,
|
level The cutoff value at which to draw the curve. If level is not specified,
|
||||||
the previously set level is used.
|
the previously set level is used.
|
||||||
============= ========================================================================
|
============== ========================================================================
|
||||||
"""
|
"""
|
||||||
if level is None:
|
if level is None:
|
||||||
level = self.level
|
level = self.level
|
||||||
|
@ -38,7 +38,7 @@ class LabelItem(GraphicsWidget, GraphicsWidgetAnchor):
|
|||||||
a CSS style string:
|
a CSS style string:
|
||||||
|
|
||||||
==================== ==============================
|
==================== ==============================
|
||||||
**Style Arguments:**
|
**Style**
|
||||||
color (str) example: 'CCFF00'
|
color (str) example: 'CCFF00'
|
||||||
size (str) example: '8pt'
|
size (str) example: '8pt'
|
||||||
bold (bool)
|
bold (bool)
|
||||||
|
@ -21,17 +21,17 @@ class LegendItem(GraphicsWidget, GraphicsWidgetAnchor):
|
|||||||
"""
|
"""
|
||||||
def __init__(self, size=None, offset=None):
|
def __init__(self, size=None, offset=None):
|
||||||
"""
|
"""
|
||||||
========== ===============================================================
|
============== ===============================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
size Specifies the fixed size (width, height) of the legend. If
|
size Specifies the fixed size (width, height) of the legend. If
|
||||||
this argument is omitted, the legend will autimatically resize
|
this argument is omitted, the legend will autimatically resize
|
||||||
to fit its contents.
|
to fit its contents.
|
||||||
offset Specifies the offset position relative to the legend's parent.
|
offset Specifies the offset position relative to the legend's parent.
|
||||||
Positive values offset from the left or top; negative values
|
Positive values offset from the left or top; negative values
|
||||||
offset from the right or bottom. If offset is None, the
|
offset from the right or bottom. If offset is None, the
|
||||||
legend must be anchored manually by calling anchor() or
|
legend must be anchored manually by calling anchor() or
|
||||||
positioned by calling setPos().
|
positioned by calling setPos().
|
||||||
========== ===============================================================
|
============== ===============================================================
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@ -61,14 +61,14 @@ class LegendItem(GraphicsWidget, GraphicsWidgetAnchor):
|
|||||||
"""
|
"""
|
||||||
Add a new entry to the legend.
|
Add a new entry to the legend.
|
||||||
|
|
||||||
=========== ========================================================
|
============== ========================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
item A PlotDataItem from which the line and point style
|
item A PlotDataItem from which the line and point style
|
||||||
of the item will be determined or an instance of
|
of the item will be determined or an instance of
|
||||||
ItemSample (or a subclass), allowing the item display
|
ItemSample (or a subclass), allowing the item display
|
||||||
to be customized.
|
to be customized.
|
||||||
title The title to display for this item. Simple HTML allowed.
|
title The title to display for this item. Simple HTML allowed.
|
||||||
=========== ========================================================
|
============== ========================================================
|
||||||
"""
|
"""
|
||||||
label = LabelItem(name)
|
label = LabelItem(name)
|
||||||
if isinstance(item, ItemSample):
|
if isinstance(item, ItemSample):
|
||||||
@ -85,10 +85,10 @@ class LegendItem(GraphicsWidget, GraphicsWidgetAnchor):
|
|||||||
"""
|
"""
|
||||||
Removes one item from the legend.
|
Removes one item from the legend.
|
||||||
|
|
||||||
=========== ========================================================
|
============== ========================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
title The title displayed for this item.
|
title The title displayed for this item.
|
||||||
=========== ========================================================
|
============== ========================================================
|
||||||
"""
|
"""
|
||||||
# Thanks, Ulrich!
|
# Thanks, Ulrich!
|
||||||
# cycle for a match
|
# cycle for a match
|
||||||
|
@ -30,19 +30,19 @@ class LinearRegionItem(UIGraphicsItem):
|
|||||||
def __init__(self, values=[0,1], orientation=None, brush=None, movable=True, bounds=None):
|
def __init__(self, values=[0,1], orientation=None, brush=None, movable=True, bounds=None):
|
||||||
"""Create a new LinearRegionItem.
|
"""Create a new LinearRegionItem.
|
||||||
|
|
||||||
============= =====================================================================
|
============== =====================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
values A list of the positions of the lines in the region. These are not
|
values A list of the positions of the lines in the region. These are not
|
||||||
limits; limits can be set by specifying bounds.
|
limits; limits can be set by specifying bounds.
|
||||||
orientation Options are LinearRegionItem.Vertical or LinearRegionItem.Horizontal.
|
orientation Options are LinearRegionItem.Vertical or LinearRegionItem.Horizontal.
|
||||||
If not specified it will be vertical.
|
If not specified it will be vertical.
|
||||||
brush Defines the brush that fills the region. Can be any arguments that
|
brush Defines the brush that fills the region. Can be any arguments that
|
||||||
are valid for :func:`mkBrush <pyqtgraph.mkBrush>`. Default is
|
are valid for :func:`mkBrush <pyqtgraph.mkBrush>`. Default is
|
||||||
transparent blue.
|
transparent blue.
|
||||||
movable If True, the region and individual lines are movable by the user; if
|
movable If True, the region and individual lines are movable by the user; if
|
||||||
False, they are static.
|
False, they are static.
|
||||||
bounds Optional [min, max] bounding values for the region
|
bounds Optional [min, max] bounding values for the region
|
||||||
============= =====================================================================
|
============= =====================================================================
|
||||||
"""
|
"""
|
||||||
|
|
||||||
UIGraphicsItem.__init__(self)
|
UIGraphicsItem.__init__(self)
|
||||||
@ -89,10 +89,10 @@ class LinearRegionItem(UIGraphicsItem):
|
|||||||
def setRegion(self, rgn):
|
def setRegion(self, rgn):
|
||||||
"""Set the values for the edges of the region.
|
"""Set the values for the edges of the region.
|
||||||
|
|
||||||
============= ==============================================
|
============= ==============================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
rgn A list or tuple of the lower and upper values.
|
rgn A list or tuple of the lower and upper values.
|
||||||
============= ==============================================
|
============= ==============================================
|
||||||
"""
|
"""
|
||||||
if self.lines[0].value() == rgn[0] and self.lines[1].value() == rgn[1]:
|
if self.lines[0].value() == rgn[0] and self.lines[1].value() == rgn[1]:
|
||||||
return
|
return
|
||||||
|
@ -291,18 +291,18 @@ class PlotDataItem(GraphicsObject):
|
|||||||
Set the downsampling mode of this item. Downsampling reduces the number
|
Set the downsampling mode of this item. Downsampling reduces the number
|
||||||
of samples drawn to increase performance.
|
of samples drawn to increase performance.
|
||||||
|
|
||||||
=========== =================================================================
|
============== =================================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
ds (int) Reduce visible plot samples by this factor. To disable,
|
ds (int) Reduce visible plot samples by this factor. To disable,
|
||||||
set ds=1.
|
set ds=1.
|
||||||
auto (bool) If True, automatically pick *ds* based on visible range
|
auto (bool) If True, automatically pick *ds* based on visible range
|
||||||
mode 'subsample': Downsample by taking the first of N samples.
|
mode 'subsample': Downsample by taking the first of N samples.
|
||||||
This method is fastest and least accurate.
|
This method is fastest and least accurate.
|
||||||
'mean': Downsample by taking the mean of N samples.
|
'mean': Downsample by taking the mean of N samples.
|
||||||
'peak': Downsample by drawing a saw wave that follows the min
|
'peak': Downsample by drawing a saw wave that follows the min
|
||||||
and max of the original data. This method produces the best
|
and max of the original data. This method produces the best
|
||||||
visual representation of the data but is slower.
|
visual representation of the data but is slower.
|
||||||
=========== =================================================================
|
============== =================================================================
|
||||||
"""
|
"""
|
||||||
changed = False
|
changed = False
|
||||||
if ds is not None:
|
if ds is not None:
|
||||||
|
@ -931,18 +931,18 @@ class PlotItem(GraphicsWidget):
|
|||||||
def setDownsampling(self, ds=None, auto=None, mode=None):
|
def setDownsampling(self, ds=None, auto=None, mode=None):
|
||||||
"""Change the default downsampling mode for all PlotDataItems managed by this plot.
|
"""Change the default downsampling mode for all PlotDataItems managed by this plot.
|
||||||
|
|
||||||
=========== =================================================================
|
============== =================================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
ds (int) Reduce visible plot samples by this factor, or
|
ds (int) Reduce visible plot samples by this factor, or
|
||||||
(bool) To enable/disable downsampling without changing the value.
|
(bool) To enable/disable downsampling without changing the value.
|
||||||
auto (bool) If True, automatically pick *ds* based on visible range
|
auto (bool) If True, automatically pick *ds* based on visible range
|
||||||
mode 'subsample': Downsample by taking the first of N samples.
|
mode 'subsample': Downsample by taking the first of N samples.
|
||||||
This method is fastest and least accurate.
|
This method is fastest and least accurate.
|
||||||
'mean': Downsample by taking the mean of N samples.
|
'mean': Downsample by taking the mean of N samples.
|
||||||
'peak': Downsample by drawing a saw wave that follows the min
|
'peak': Downsample by drawing a saw wave that follows the min
|
||||||
and max of the original data. This method produces the best
|
and max of the original data. This method produces the best
|
||||||
visual representation of the data but is slower.
|
visual representation of the data but is slower.
|
||||||
=========== =================================================================
|
============= =================================================================
|
||||||
"""
|
"""
|
||||||
if ds is not None:
|
if ds is not None:
|
||||||
if ds is False:
|
if ds is False:
|
||||||
@ -1113,15 +1113,15 @@ class PlotItem(GraphicsWidget):
|
|||||||
"""
|
"""
|
||||||
Set the label for an axis. Basic HTML formatting is allowed.
|
Set the label for an axis. Basic HTML formatting is allowed.
|
||||||
|
|
||||||
============= =================================================================
|
============== =================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
axis must be one of 'left', 'bottom', 'right', or 'top'
|
axis must be one of 'left', 'bottom', 'right', or 'top'
|
||||||
text text to display along the axis. HTML allowed.
|
text text to display along the axis. HTML allowed.
|
||||||
units units to display after the title. If units are given,
|
units units to display after the title. If units are given,
|
||||||
then an SI prefix will be automatically appended
|
then an SI prefix will be automatically appended
|
||||||
and the axis values will be scaled accordingly.
|
and the axis values will be scaled accordingly.
|
||||||
(ie, use 'V' instead of 'mV'; 'm' will be added automatically)
|
(ie, use 'V' instead of 'mV'; 'm' will be added automatically)
|
||||||
============= =================================================================
|
============== =================================================================
|
||||||
"""
|
"""
|
||||||
self.getAxis(axis).setLabel(text=text, units=units, **args)
|
self.getAxis(axis).setLabel(text=text, units=units, **args)
|
||||||
self.showAxis(axis)
|
self.showAxis(axis)
|
||||||
|
@ -253,13 +253,13 @@ class ScatterPlotItem(GraphicsObject):
|
|||||||
|
|
||||||
def setData(self, *args, **kargs):
|
def setData(self, *args, **kargs):
|
||||||
"""
|
"""
|
||||||
**Ordered Arguments:**
|
**Ordered**
|
||||||
|
|
||||||
* If there is only one unnamed argument, it will be interpreted like the 'spots' argument.
|
* If there is only one unnamed argument, it will be interpreted like the 'spots' argument.
|
||||||
* If there are two unnamed arguments, they will be interpreted as sequences of x and y values.
|
* If there are two unnamed arguments, they will be interpreted as sequences of x and y values.
|
||||||
|
|
||||||
====================== ===============================================================================================
|
====================== ===============================================================================================
|
||||||
**Keyword Arguments:**
|
**Keyword**
|
||||||
*spots* Optional list of dicts. Each dict specifies parameters for a single spot:
|
*spots* Optional list of dicts. Each dict specifies parameters for a single spot:
|
||||||
{'pos': (x,y), 'size', 'pen', 'brush', 'symbol'}. This is just an alternate method
|
{'pos': (x,y), 'size', 'pen', 'brush', 'symbol'}. This is just an alternate method
|
||||||
of passing in data for the corresponding arguments.
|
of passing in data for the corresponding arguments.
|
||||||
|
@ -9,18 +9,18 @@ class TextItem(UIGraphicsItem):
|
|||||||
"""
|
"""
|
||||||
def __init__(self, text='', color=(200,200,200), html=None, anchor=(0,0), border=None, fill=None, angle=0):
|
def __init__(self, text='', color=(200,200,200), html=None, anchor=(0,0), border=None, fill=None, angle=0):
|
||||||
"""
|
"""
|
||||||
=========== =================================================================================
|
============== =================================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
*text* The text to display
|
*text* The text to display
|
||||||
*color* The color of the text (any format accepted by pg.mkColor)
|
*color* The color of the text (any format accepted by pg.mkColor)
|
||||||
*html* If specified, this overrides both *text* and *color*
|
*html* If specified, this overrides both *text* and *color*
|
||||||
*anchor* A QPointF or (x,y) sequence indicating what region of the text box will
|
*anchor* A QPointF or (x,y) sequence indicating what region of the text box will
|
||||||
be anchored to the item's position. A value of (0,0) sets the upper-left corner
|
be anchored to the item's position. A value of (0,0) sets the upper-left corner
|
||||||
of the text box to be at the position specified by setPos(), while a value of (1,1)
|
of the text box to be at the position specified by setPos(), while a value of (1,1)
|
||||||
sets the lower-right corner.
|
sets the lower-right corner.
|
||||||
*border* A pen to use when drawing the border
|
*border* A pen to use when drawing the border
|
||||||
*fill* A brush to use when filling within the border
|
*fill* A brush to use when filling within the border
|
||||||
=========== =================================================================================
|
=========== =================================================================================
|
||||||
"""
|
"""
|
||||||
|
|
||||||
## not working yet
|
## not working yet
|
||||||
|
@ -19,15 +19,15 @@ class VTickGroup(UIGraphicsItem):
|
|||||||
"""
|
"""
|
||||||
def __init__(self, xvals=None, yrange=None, pen=None):
|
def __init__(self, xvals=None, yrange=None, pen=None):
|
||||||
"""
|
"""
|
||||||
============= ===================================================================
|
============== ===================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
xvals A list of x values (in data coordinates) at which to draw ticks.
|
xvals A list of x values (in data coordinates) at which to draw ticks.
|
||||||
yrange A list of [low, high] limits for the tick. 0 is the bottom of
|
yrange A list of [low, high] limits for the tick. 0 is the bottom of
|
||||||
the view, 1 is the top. [0.8, 1] would draw ticks in the top
|
the view, 1 is the top. [0.8, 1] would draw ticks in the top
|
||||||
fifth of the view.
|
fifth of the view.
|
||||||
pen The pen to use for drawing ticks. Default is grey. Can be specified
|
pen The pen to use for drawing ticks. Default is grey. Can be specified
|
||||||
as any argument valid for :func:`mkPen<pyqtgraph.mkPen>`
|
as any argument valid for :func:`mkPen<pyqtgraph.mkPen>`
|
||||||
============= ===================================================================
|
============== ===================================================================
|
||||||
"""
|
"""
|
||||||
if yrange is None:
|
if yrange is None:
|
||||||
yrange = [0, 1]
|
yrange = [0, 1]
|
||||||
@ -56,10 +56,10 @@ class VTickGroup(UIGraphicsItem):
|
|||||||
def setXVals(self, vals):
|
def setXVals(self, vals):
|
||||||
"""Set the x values for the ticks.
|
"""Set the x values for the ticks.
|
||||||
|
|
||||||
============= =====================================================================
|
============= =====================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
vals A list of x values (in data/plot coordinates) at which to draw ticks.
|
vals A list of x values (in data/plot coordinates) at which to draw ticks.
|
||||||
============= =====================================================================
|
============= =====================================================================
|
||||||
"""
|
"""
|
||||||
self.xvals = vals
|
self.xvals = vals
|
||||||
self.rebuildTicks()
|
self.rebuildTicks()
|
||||||
|
@ -71,16 +71,16 @@ class ViewBox(GraphicsWidget):
|
|||||||
|
|
||||||
def __init__(self, parent=None, border=None, lockAspect=False, enableMouse=True, invertY=False, enableMenu=True, name=None):
|
def __init__(self, parent=None, border=None, lockAspect=False, enableMouse=True, invertY=False, enableMenu=True, name=None):
|
||||||
"""
|
"""
|
||||||
============= =============================================================
|
============== =============================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
*parent* (QGraphicsWidget) Optional parent widget
|
*parent* (QGraphicsWidget) Optional parent widget
|
||||||
*border* (QPen) Do draw a border around the view, give any
|
*border* (QPen) Do draw a border around the view, give any
|
||||||
single argument accepted by :func:`mkPen <pyqtgraph.mkPen>`
|
single argument accepted by :func:`mkPen <pyqtgraph.mkPen>`
|
||||||
*lockAspect* (False or float) The aspect ratio to lock the view
|
*lockAspect* (False or float) The aspect ratio to lock the view
|
||||||
coorinates to. (or False to allow the ratio to change)
|
coorinates to. (or False to allow the ratio to change)
|
||||||
*enableMouse* (bool) Whether mouse can be used to scale/pan the view
|
*enableMouse* (bool) Whether mouse can be used to scale/pan the view
|
||||||
*invertY* (bool) See :func:`invertY <pyqtgraph.ViewBox.invertY>`
|
*invertY* (bool) See :func:`invertY <pyqtgraph.ViewBox.invertY>`
|
||||||
============= =============================================================
|
============== =============================================================
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
@ -562,14 +562,14 @@ class ViewBox(GraphicsWidget):
|
|||||||
Note that this is not the same as enableAutoRange, which causes the view to
|
Note that this is not the same as enableAutoRange, which causes the view to
|
||||||
automatically auto-range whenever its contents are changed.
|
automatically auto-range whenever its contents are changed.
|
||||||
|
|
||||||
=========== ============================================================
|
============== ============================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
padding The fraction of the total data range to add on to the final
|
padding The fraction of the total data range to add on to the final
|
||||||
visible range. By default, this value is set between 0.02
|
visible range. By default, this value is set between 0.02
|
||||||
and 0.1 depending on the size of the ViewBox.
|
and 0.1 depending on the size of the ViewBox.
|
||||||
items If specified, this is a list of items to consider when
|
items If specified, this is a list of items to consider when
|
||||||
determining the visible range.
|
determining the visible range.
|
||||||
=========== ============================================================
|
============== ============================================================
|
||||||
"""
|
"""
|
||||||
if item is None:
|
if item is None:
|
||||||
bounds = self.childrenBoundingRect(items=items)
|
bounds = self.childrenBoundingRect(items=items)
|
||||||
|
@ -38,25 +38,25 @@ class Process(RemoteEventHandler):
|
|||||||
|
|
||||||
def __init__(self, name=None, target=None, executable=None, copySysPath=True, debug=False, timeout=20, wrapStdout=None):
|
def __init__(self, name=None, target=None, executable=None, copySysPath=True, debug=False, timeout=20, wrapStdout=None):
|
||||||
"""
|
"""
|
||||||
============ =============================================================
|
============== =============================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
name Optional name for this process used when printing messages
|
name Optional name for this process used when printing messages
|
||||||
from the remote process.
|
from the remote process.
|
||||||
target Optional function to call after starting remote process.
|
target Optional function to call after starting remote process.
|
||||||
By default, this is startEventLoop(), which causes the remote
|
By default, this is startEventLoop(), which causes the remote
|
||||||
process to process requests from the parent process until it
|
process to process requests from the parent process until it
|
||||||
is asked to quit. If you wish to specify a different target,
|
is asked to quit. If you wish to specify a different target,
|
||||||
it must be picklable (bound methods are not).
|
it must be picklable (bound methods are not).
|
||||||
copySysPath If True, copy the contents of sys.path to the remote process
|
copySysPath If True, copy the contents of sys.path to the remote process
|
||||||
debug If True, print detailed information about communication
|
debug If True, print detailed information about communication
|
||||||
with the child process.
|
with the child process.
|
||||||
wrapStdout If True (default on windows) then stdout and stderr from the
|
wrapStdout If True (default on windows) then stdout and stderr from the
|
||||||
child process will be caught by the parent process and
|
child process will be caught by the parent process and
|
||||||
forwarded to its stdout/stderr. This provides a workaround
|
forwarded to its stdout/stderr. This provides a workaround
|
||||||
for a python bug: http://bugs.python.org/issue3905
|
for a python bug: http://bugs.python.org/issue3905
|
||||||
but has the side effect that child output is significantly
|
but has the side effect that child output is significantly
|
||||||
delayed relative to the parent output.
|
delayed relative to the parent output.
|
||||||
============ =============================================================
|
============== =============================================================
|
||||||
"""
|
"""
|
||||||
if target is None:
|
if target is None:
|
||||||
target = startEventLoop
|
target = startEventLoop
|
||||||
|
@ -299,23 +299,23 @@ class RemoteEventHandler(object):
|
|||||||
(The docstring has information that is nevertheless useful to the programmer
|
(The docstring has information that is nevertheless useful to the programmer
|
||||||
as it describes the internal protocol used to communicate between processes)
|
as it describes the internal protocol used to communicate between processes)
|
||||||
|
|
||||||
========== ====================================================================
|
============== ====================================================================
|
||||||
**Arguments:**
|
**Arguments:**
|
||||||
request String describing the type of request being sent (see below)
|
request String describing the type of request being sent (see below)
|
||||||
reqId Integer uniquely linking a result back to the request that generated
|
reqId Integer uniquely linking a result back to the request that generated
|
||||||
it. (most requests leave this blank)
|
it. (most requests leave this blank)
|
||||||
callSync 'sync': return the actual result of the request
|
callSync 'sync': return the actual result of the request
|
||||||
'async': return a Request object which can be used to look up the
|
'async': return a Request object which can be used to look up the
|
||||||
result later
|
result later
|
||||||
'off': return no result
|
'off': return no result
|
||||||
timeout Time in seconds to wait for a response when callSync=='sync'
|
timeout Time in seconds to wait for a response when callSync=='sync'
|
||||||
opts Extra arguments sent to the remote process that determine the way
|
opts Extra arguments sent to the remote process that determine the way
|
||||||
the request will be handled (see below)
|
the request will be handled (see below)
|
||||||
returnType 'proxy', 'value', or 'auto'
|
returnType 'proxy', 'value', or 'auto'
|
||||||
byteData If specified, this is a list of objects to be sent as byte messages
|
byteData If specified, this is a list of objects to be sent as byte messages
|
||||||
to the remote process.
|
to the remote process.
|
||||||
This is used to send large arrays without the cost of pickling.
|
This is used to send large arrays without the cost of pickling.
|
||||||
========== ====================================================================
|
============== ====================================================================
|
||||||
|
|
||||||
Description of request strings and options allowed for each:
|
Description of request strings and options allowed for each:
|
||||||
|
|
||||||
|
@ -23,18 +23,18 @@ class MeshData(object):
|
|||||||
|
|
||||||
def __init__(self, vertexes=None, faces=None, edges=None, vertexColors=None, faceColors=None):
|
def __init__(self, vertexes=None, faces=None, edges=None, vertexColors=None, faceColors=None):
|
||||||
"""
|
"""
|
||||||
============= =====================================================
|
============== =====================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
vertexes (Nv, 3) array of vertex coordinates.
|
vertexes (Nv, 3) array of vertex coordinates.
|
||||||
If faces is not specified, then this will instead be
|
If faces is not specified, then this will instead be
|
||||||
interpreted as (Nf, 3, 3) array of coordinates.
|
interpreted as (Nf, 3, 3) array of coordinates.
|
||||||
faces (Nf, 3) array of indexes into the vertex array.
|
faces (Nf, 3) array of indexes into the vertex array.
|
||||||
edges [not available yet]
|
edges [not available yet]
|
||||||
vertexColors (Nv, 4) array of vertex colors.
|
vertexColors (Nv, 4) array of vertex colors.
|
||||||
If faces is not specified, then this will instead be
|
If faces is not specified, then this will instead be
|
||||||
interpreted as (Nf, 3, 4) array of colors.
|
interpreted as (Nf, 3, 4) array of colors.
|
||||||
faceColors (Nf, 4) array of face colors.
|
faceColors (Nf, 4) array of face colors.
|
||||||
============= =====================================================
|
============== =====================================================
|
||||||
|
|
||||||
All arguments are optional.
|
All arguments are optional.
|
||||||
"""
|
"""
|
||||||
|
@ -19,7 +19,7 @@ class GLMeshItem(GLGraphicsItem):
|
|||||||
def __init__(self, **kwds):
|
def __init__(self, **kwds):
|
||||||
"""
|
"""
|
||||||
============== =====================================================
|
============== =====================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
meshdata MeshData object from which to determine geometry for
|
meshdata MeshData object from which to determine geometry for
|
||||||
this item.
|
this item.
|
||||||
color Default face color used if no vertex or face colors
|
color Default face color used if no vertex or face colors
|
||||||
|
@ -36,14 +36,14 @@ class GLSurfacePlotItem(GLMeshItem):
|
|||||||
"""
|
"""
|
||||||
Update the data in this surface plot.
|
Update the data in this surface plot.
|
||||||
|
|
||||||
========== =====================================================================
|
============== =====================================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
x,y 1D arrays of values specifying the x,y positions of vertexes in the
|
x,y 1D arrays of values specifying the x,y positions of vertexes in the
|
||||||
grid. If these are omitted, then the values will be assumed to be
|
grid. If these are omitted, then the values will be assumed to be
|
||||||
integers.
|
integers.
|
||||||
z 2D array of height values for each grid vertex.
|
z 2D array of height values for each grid vertex.
|
||||||
colors (width, height, 4) array of vertex colors.
|
colors (width, height, 4) array of vertex colors.
|
||||||
========== =====================================================================
|
============== =====================================================================
|
||||||
|
|
||||||
All arguments are optional.
|
All arguments are optional.
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ class Parameter(QtCore.QObject):
|
|||||||
by most Parameter subclasses.
|
by most Parameter subclasses.
|
||||||
|
|
||||||
======================= =========================================================
|
======================= =========================================================
|
||||||
**Keyword Arguments:**
|
**Keyword**
|
||||||
name The name to give this Parameter. This is the name that
|
name The name to give this Parameter. This is the name that
|
||||||
will appear in the left-most column of a ParameterTree
|
will appear in the left-most column of a ParameterTree
|
||||||
for this Parameter.
|
for this Parameter.
|
||||||
@ -675,13 +675,13 @@ class Parameter(QtCore.QObject):
|
|||||||
"""
|
"""
|
||||||
Called when the state of any sub-parameter has changed.
|
Called when the state of any sub-parameter has changed.
|
||||||
|
|
||||||
========== ================================================================
|
============== ================================================================
|
||||||
Arguments:
|
**Arguments:**
|
||||||
param The immediate child whose tree state has changed.
|
param The immediate child whose tree state has changed.
|
||||||
note that the change may have originated from a grandchild.
|
note that the change may have originated from a grandchild.
|
||||||
changes List of tuples describing all changes that have been made
|
changes List of tuples describing all changes that have been made
|
||||||
in this event: (param, changeDescr, data)
|
in this event: (param, changeDescr, data)
|
||||||
========== ================================================================
|
============== ================================================================
|
||||||
|
|
||||||
This function can be extended to react to tree state changes.
|
This function can be extended to react to tree state changes.
|
||||||
"""
|
"""
|
||||||
|
@ -86,14 +86,14 @@ class ColorMapParameter(ptree.types.GroupParameter):
|
|||||||
"""
|
"""
|
||||||
Return an array of colors corresponding to *data*.
|
Return an array of colors corresponding to *data*.
|
||||||
|
|
||||||
========= =================================================================
|
============== =================================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
data A numpy record array where the fields in data.dtype match those
|
data A numpy record array where the fields in data.dtype match those
|
||||||
defined by a prior call to setFields().
|
defined by a prior call to setFields().
|
||||||
mode Either 'byte' or 'float'. For 'byte', the method returns an array
|
mode Either 'byte' or 'float'. For 'byte', the method returns an array
|
||||||
of dtype ubyte with values scaled 0-255. For 'float', colors are
|
of dtype ubyte with values scaled 0-255. For 'float', colors are
|
||||||
returned as 0.0-1.0 float values.
|
returned as 0.0-1.0 float values.
|
||||||
========= =================================================================
|
============== =================================================================
|
||||||
"""
|
"""
|
||||||
colors = np.zeros((len(data),4))
|
colors = np.zeros((len(data),4))
|
||||||
for item in self.children():
|
for item in self.children():
|
||||||
|
@ -16,18 +16,18 @@ class ValueLabel(QtGui.QLabel):
|
|||||||
|
|
||||||
def __init__(self, parent=None, suffix='', siPrefix=False, averageTime=0, formatStr=None):
|
def __init__(self, parent=None, suffix='', siPrefix=False, averageTime=0, formatStr=None):
|
||||||
"""
|
"""
|
||||||
============ ==================================================================================
|
============== ==================================================================================
|
||||||
Arguments
|
**Arguments:**
|
||||||
suffix (str or None) The suffix to place after the value
|
suffix (str or None) The suffix to place after the value
|
||||||
siPrefix (bool) Whether to add an SI prefix to the units and display a scaled value
|
siPrefix (bool) Whether to add an SI prefix to the units and display a scaled value
|
||||||
averageTime (float) The length of time in seconds to average values. If this value
|
averageTime (float) The length of time in seconds to average values. If this value
|
||||||
is 0, then no averaging is performed. As this value increases
|
is 0, then no averaging is performed. As this value increases
|
||||||
the display value will appear to change more slowly and smoothly.
|
the display value will appear to change more slowly and smoothly.
|
||||||
formatStr (str) Optionally, provide a format string to use when displaying text. The text
|
formatStr (str) Optionally, provide a format string to use when displaying text. The text
|
||||||
will be generated by calling formatStr.format(value=, avgValue=, suffix=)
|
will be generated by calling formatStr.format(value=, avgValue=, suffix=)
|
||||||
(see Python documentation on str.format)
|
(see Python documentation on str.format)
|
||||||
This option is not compatible with siPrefix
|
This option is not compatible with siPrefix
|
||||||
============ ==================================================================================
|
============== ==================================================================================
|
||||||
"""
|
"""
|
||||||
QtGui.QLabel.__init__(self, parent)
|
QtGui.QLabel.__init__(self, parent)
|
||||||
self.values = []
|
self.values = []
|
||||||
|
Loading…
Reference in New Issue
Block a user