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