Bugfix: Malformed tables.

All argument lists with `**Arguments:**`
This commit is contained in:
tommy3001 2014-02-05 21:04:33 +01:00
parent 2279775244
commit 2a13994a2a
23 changed files with 348 additions and 348 deletions

View File

@ -47,8 +47,8 @@ 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.
@ -67,7 +67,7 @@ class ArrowItem(QtGui.QGraphicsPathItem):
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)

View File

@ -156,8 +156,8 @@ 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
@ -166,7 +166,7 @@ class AxisItem(GraphicsWidget):
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::

View File

@ -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,7 +748,7 @@ 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>`
@ -757,7 +757,7 @@ class GradientEditorItem(TickSliderItem):
- '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'])

View File

@ -28,8 +28,8 @@ 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.
@ -50,7 +50,7 @@ class GraphItem(GraphicsObject):
: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')

View File

@ -28,7 +28,7 @@ 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.

View File

@ -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

View File

@ -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)

View File

@ -21,8 +21,8 @@ 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.
@ -31,7 +31,7 @@ class LegendItem(GraphicsWidget, GraphicsWidgetAnchor):
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

View File

@ -30,7 +30,7 @@ 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.

View File

@ -291,8 +291,8 @@ 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
@ -302,7 +302,7 @@ class PlotDataItem(GraphicsObject):
'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:

View File

@ -931,8 +931,8 @@ 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
@ -942,7 +942,7 @@ class PlotItem(GraphicsWidget):
'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,7 +1113,7 @@ 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.
@ -1121,7 +1121,7 @@ class PlotItem(GraphicsWidget):
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)

View File

@ -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.

View File

@ -9,7 +9,7 @@ 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)

View File

@ -19,7 +19,7 @@ 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
@ -27,7 +27,7 @@ class VTickGroup(UIGraphicsItem):
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]

View File

@ -71,7 +71,7 @@ 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
@ -80,7 +80,7 @@ class ViewBox(GraphicsWidget):
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)

View File

@ -38,7 +38,7 @@ 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.
@ -56,7 +56,7 @@ class Process(RemoteEventHandler):
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

View File

@ -299,7 +299,7 @@ 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
@ -315,7 +315,7 @@ class RemoteEventHandler(object):
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:

View File

@ -23,8 +23,8 @@ 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.
@ -34,7 +34,7 @@ class MeshData(object):
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.
""" """

View File

@ -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

View File

@ -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.

View File

@ -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.
""" """

View File

@ -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():

View File

@ -16,8 +16,8 @@ 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
@ -27,7 +27,7 @@ class ValueLabel(QtGui.QLabel):
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 = []