Merge pull request #1326 from ixjlyons/doc-multiplotitem
Improve docs for MultiPlotWidget and MultiPlotItem
This commit is contained in:
commit
7504f2ba27
@ -18,6 +18,7 @@ Contents:
|
||||
infiniteline
|
||||
roi
|
||||
graphicslayout
|
||||
multiplotitem
|
||||
plotcurveitem
|
||||
scatterplotitem
|
||||
isocurveitem
|
||||
|
5
doc/source/graphicsItems/multiplotitem.rst
Normal file
5
doc/source/graphicsItems/multiplotitem.rst
Normal file
@ -0,0 +1,5 @@
|
||||
MultiPlotItem
|
||||
=============
|
||||
|
||||
.. autoclass:: pyqtgraph.MultiPlotItem
|
||||
:members:
|
@ -4,22 +4,33 @@ MultiPlotItem.py - Graphics item used for displaying an array of PlotItems
|
||||
Copyright 2010 Luke Campagnola
|
||||
Distributed under MIT/X11 license. See license.txt for more information.
|
||||
"""
|
||||
from numpy import ndarray
|
||||
from . import GraphicsLayout
|
||||
from ..metaarray import *
|
||||
|
||||
|
||||
__all__ = ['MultiPlotItem']
|
||||
|
||||
|
||||
class MultiPlotItem(GraphicsLayout.GraphicsLayout):
|
||||
"""
|
||||
Automatically generates a grid of plots from a multi-dimensional array
|
||||
:class:`~pyqtgraph.GraphicsLayout` that automatically generates a grid of
|
||||
plots from a MetaArray.
|
||||
|
||||
.. seealso:: :class:`~pyqtgraph.MultiPlotWidget`: Widget containing a MultiPlotItem
|
||||
"""
|
||||
|
||||
def __init__(self, *args, **kwds):
|
||||
GraphicsLayout.GraphicsLayout.__init__(self, *args, **kwds)
|
||||
self.plots = []
|
||||
|
||||
|
||||
def plot(self, data, **plotArgs):
|
||||
"""Plot the data from a MetaArray with each array column as a separate
|
||||
:class:`~pyqtgraph.PlotItem`.
|
||||
|
||||
Axis labels are automatically extracted from the array info.
|
||||
|
||||
``plotArgs`` are passed to :meth:`PlotItem.plot
|
||||
<pyqtgraph.PlotItem.plot>`.
|
||||
"""
|
||||
#self.layout.clear()
|
||||
|
||||
if hasattr(data, 'implements') and data.implements('MetaArray'):
|
||||
|
@ -10,7 +10,8 @@ from ..graphicsItems import MultiPlotItem as MultiPlotItem
|
||||
|
||||
__all__ = ['MultiPlotWidget']
|
||||
class MultiPlotWidget(GraphicsView):
|
||||
"""Widget implementing a graphicsView with a single MultiPlotItem inside."""
|
||||
"""Widget implementing a :class:`~pyqtgraph.GraphicsView` with a single
|
||||
:class:`~pyqtgraph.MultiPlotItem` inside."""
|
||||
def __init__(self, parent=None):
|
||||
self.minPlotHeight = 50
|
||||
self.mPlotItem = MultiPlotItem.MultiPlotItem()
|
||||
|
Loading…
Reference in New Issue
Block a user