- Links in plot function added/resolved

(PlotWidget.plot() can not resolved, maybe useless)

-Links in "Organization of Plotting Classes" added/resolved
   - GraphicsLayoutItem changed to GraphicsLayout
      (svg/png picture also)

  graphicswindow.rst now useless (no link)

  Yes it "makes" ....
This commit is contained in:
tommy3001 2014-02-08 17:16:45 +01:00
parent 71db5aea91
commit f1f097ec21

View File

@ -3,12 +3,12 @@ Plotting in pyqtgraph
There are a few basic ways to plot data in pyqtgraph:
================================================================ ==================================================
:func:`pyqtgraph.plot` Create a new plot window showing your data
:func:`PlotWidget.plot() <pyqtgraph.PlotWidget.plot>` Add a new set of data to an existing plot widget
:func:`PlotItem.plot() <pyqtgraph.PlotItem.plot>` Add a new set of data to an existing plot widget
:func:`GraphicsWindow.addPlot() <pyqtgraph.GraphicsWindow.plot>` Add a new plot to a grid of plots
================================================================ ==================================================
=================================================================== ==================================================
:func:`pyqtgraph.plot` Create a new plot window showing your data
:func:`PlotWidget.plot() <pyqtgraph.PlotWidget.plot>` Add a new set of data to an existing plot widget
:func:`PlotItem.plot() <pyqtgraph.PlotItem.plot>` Add a new set of data to an existing plot widget
:func:`GraphicsLayout.addPlot() <pyqtgraph.GraphicsLayout.addPlot>` Add a new plot to a grid of plots
=================================================================== ==================================================
All of these will accept the same basic arguments which control how the plot data is interpreted and displayed:
@ -31,17 +31,17 @@ Organization of Plotting Classes
There are several classes invloved in displaying plot data. Most of these classes are instantiated automatically, but it is useful to understand how they are organized and relate to each other. Pyqtgraph is based heavily on Qt's GraphicsView framework--if you are not already familiar with this, it's worth reading about (but not essential). Most importantly: 1) Qt GUIs are composed of QWidgets, 2) A special widget called QGraphicsView is used for displaying complex graphics, and 3) QGraphicsItems define the objects that are displayed within a QGraphicsView.
* Data Classes (all subclasses of QGraphicsItem)
* PlotCurveItem - Displays a plot line given x,y data
* ScatterPlotItem - Displays points given x,y data
* :class:`PlotDataItem <pyqtgraph.graphicsItems.PlotDataItem.PlotDataItem>` - Combines PlotCurveItem and ScatterPlotItem. The plotting functions discussed above create objects of this type.
* :class:`PlotCurveItem <pyqtgraph.PlotCurveItem>` - Displays a plot line given x,y data
* :class:`ScatterPlotItem <pyqtgraph.ScatterPlotItem>` - Displays points given x,y data
* :class:`PlotDataItem <pyqtgraph.PlotDataItem>` - Combines PlotCurveItem and ScatterPlotItem. The plotting functions discussed above create objects of this type.
* Container Classes (subclasses of QGraphicsItem; contain other QGraphicsItem objects and must be viewed from within a GraphicsView)
* PlotItem - Contains a ViewBox for displaying data as well as AxisItems and labels for displaying the axes and title. This is a QGraphicsItem subclass and thus may only be used from within a GraphicsView
* GraphicsLayoutItem - QGraphicsItem subclass which displays a grid of items. This is used to display multiple PlotItems together.
* ViewBox - A QGraphicsItem subclass for displaying data. The user may scale/pan the contents of a ViewBox using the mouse. Typically all PlotData/PlotCurve/ScatterPlotItems are displayed from within a ViewBox.
* AxisItem - Displays axis values, ticks, and labels. Most commonly used with PlotItem.
* :class:`PlotItem <pyqtgraph.PlotItem>` - Contains a ViewBox for displaying data as well as AxisItems and labels for displaying the axes and title. This is a QGraphicsItem subclass and thus may only be used from within a GraphicsView
* :class:`GraphicsLayout <pyqtgraph.GraphicsLayout>` - QGraphicsItem subclass which displays a grid of items. This is used to display multiple PlotItems together.
* :class:`ViewBox <pyqtgraph.ViewBox>` - A QGraphicsItem subclass for displaying data. The user may scale/pan the contents of a ViewBox using the mouse. Typically all PlotData/PlotCurve/ScatterPlotItems are displayed from within a ViewBox.
* :class:`AxisItem <pyqtgraph.AxisItem>` - Displays axis values, ticks, and labels. Most commonly used with PlotItem.
* Container Classes (subclasses of QWidget; may be embedded in PyQt GUIs)
* PlotWidget - A subclass of GraphicsView with a single PlotItem displayed. Most of the methods provided by PlotItem are also available through PlotWidget.
* GraphicsLayoutWidget - QWidget subclass displaying a single GraphicsLayoutItem. Most of the methods provided by GraphicsLayoutItem are also available through GraphicsLayoutWidget.
* :class:`PlotWidget <pyqtgraph.PlotWidget>` - A subclass of GraphicsView with a single PlotItem displayed. Most of the methods provided by PlotItem are also available through PlotWidget.
* :class:`GraphicsLayoutWidget <pyqtgraph.GraphicsLayoutWidget>` - QWidget subclass displaying a single GraphicsLayoutItem. Most of the methods provided by GraphicsLayoutItem are also available through GraphicsLayoutWidget.
.. image:: images/plottingClasses.png