parent
c72638ab1b
commit
250ae84149
|
@ -25,6 +25,7 @@ Contributors
|
|||
* Guillaume Poulin
|
||||
* Antony Lee
|
||||
* Mattias Põldaru
|
||||
* Thomas S.
|
||||
|
||||
Requirements
|
||||
------------
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
3D Graphics
|
||||
===========
|
||||
|
||||
Pyqtgraph uses OpenGL to provide a 3D scenegraph system. This system is functional but still early in development.
|
||||
PyQtGraph uses OpenGL to provide a 3D scenegraph system. This system is functional but still early in development.
|
||||
Current capabilities include:
|
||||
|
||||
* 3D view widget with zoom/rotate controls (mouse drag and wheel)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Pyqtgraph's 3D Graphics System
|
||||
PyQtGraph's 3D Graphics System
|
||||
==============================
|
||||
|
||||
The 3D graphics system in pyqtgraph is composed of a :class:`view widget <pyqtgraph.opengl.GLViewWidget>` and
|
||||
|
|
|
@ -13,7 +13,7 @@ Simple Data Display Functions
|
|||
Color, Pen, and Brush Functions
|
||||
-------------------------------
|
||||
|
||||
Qt uses the classes QColor, QPen, and QBrush to determine how to draw lines and fill shapes. These classes are highly capable but somewhat awkward to use. Pyqtgraph offers the functions :func:`~pyqtgraph.mkColor`, :func:`~pyqtgraph.mkPen`, and :func:`~pyqtgraph.mkBrush` to simplify the process of creating these classes. In most cases, however, it will be unnecessary to call these functions directly--any function or method that accepts *pen* or *brush* arguments will make use of these functions for you. For example, the following three lines all have the same effect::
|
||||
Qt uses the classes QColor, QPen, and QBrush to determine how to draw lines and fill shapes. These classes are highly capable but somewhat awkward to use. PyQtGraph offers the functions :func:`~pyqtgraph.mkColor`, :func:`~pyqtgraph.mkPen`, and :func:`~pyqtgraph.mkBrush` to simplify the process of creating these classes. In most cases, however, it will be unnecessary to call these functions directly--any function or method that accepts *pen* or *brush* arguments will make use of these functions for you. For example, the following three lines all have the same effect::
|
||||
|
||||
pg.plot(xdata, ydata, pen='r')
|
||||
pg.plot(xdata, ydata, pen=pg.mkPen('r'))
|
||||
|
|
|
@ -12,7 +12,7 @@ There are a few suggested ways to use pyqtgraph:
|
|||
Command-line use
|
||||
----------------
|
||||
|
||||
Pyqtgraph makes it very easy to visualize data from the command line. Observe::
|
||||
PyQtGraph makes it very easy to visualize data from the command line. Observe::
|
||||
|
||||
import pyqtgraph as pg
|
||||
pg.plot(data) # data can be a list of values or a numpy array
|
||||
|
@ -43,7 +43,7 @@ While I consider this approach somewhat lazy, it is often the case that 'lazy' i
|
|||
Embedding widgets inside PyQt applications
|
||||
------------------------------------------
|
||||
|
||||
For the serious application developer, all of the functionality in pyqtgraph is available via :ref:`widgets <api_widgets>` that can be embedded just like any other Qt widgets. Most importantly, see: :class:`PlotWidget <pyqtgraph.PlotWidget>`, :class:`ImageView <pyqtgraph.ImageView>`, :class:`GraphicsLayoutWidget <pyqtgraph.GraphicsLayoutWidget>`, and :class:`GraphicsView <pyqtgraph.GraphicsView>`. Pyqtgraph's widgets can be included in Designer's ui files via the "Promote To..." functionality:
|
||||
For the serious application developer, all of the functionality in pyqtgraph is available via :ref:`widgets <api_widgets>` that can be embedded just like any other Qt widgets. Most importantly, see: :class:`PlotWidget <pyqtgraph.PlotWidget>`, :class:`ImageView <pyqtgraph.ImageView>`, :class:`GraphicsLayoutWidget <pyqtgraph.GraphicsLayoutWidget>`, and :class:`GraphicsView <pyqtgraph.GraphicsView>`. PyQtGraph's widgets can be included in Designer's ui files via the "Promote To..." functionality:
|
||||
|
||||
#. In Designer, create a QGraphicsView widget ("Graphics View" under the "Display Widgets" category).
|
||||
#. Right-click on the QGraphicsView and select "Promote To...".
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Displaying images and video
|
||||
===========================
|
||||
|
||||
Pyqtgraph displays 2D numpy arrays as images and provides tools for determining how to translate between the numpy data type and RGB values on the screen. If you want to display data from common image and video file formats, you will need to load the data first using another library (PIL works well for images and built-in numpy conversion).
|
||||
PyQtGraph displays 2D numpy arrays as images and provides tools for determining how to translate between the numpy data type and RGB values on the screen. If you want to display data from common image and video file formats, you will need to load the data first using another library (PIL works well for images and built-in numpy conversion).
|
||||
|
||||
The easiest way to display 2D or 3D data is using the :func:`pyqtgraph.image` function::
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Installation
|
||||
============
|
||||
|
||||
Pyqtgraph does not really require any installation scripts. All that is needed is for the pyqtgraph folder to be placed someplace importable. Most people will prefer to simply place this folder within a larger project folder. If you want to make pyqtgraph available system-wide, use one of the methods listed below:
|
||||
PyQtGraph does not really require any installation scripts. All that is needed is for the pyqtgraph folder to be placed someplace importable. Most people will prefer to simply place this folder within a larger project folder. If you want to make pyqtgraph available system-wide, use one of the methods listed below:
|
||||
|
||||
* **Debian, Ubuntu, and similar Linux:** Download the .deb file linked at the top of the pyqtgraph web page or install using apt by putting "deb http://luke.campagnola.me/debian dev/" in your /etc/apt/sources.list file and install the python-pyqtgraph package.
|
||||
* **Arch Linux:** Looks like someone has posted unofficial packages for Arch (thanks windel). (https://aur.archlinux.org/packages.php?ID=62577)
|
||||
|
|
|
@ -6,9 +6,9 @@ Introduction
|
|||
What is pyqtgraph?
|
||||
------------------
|
||||
|
||||
Pyqtgraph is a graphics and user interface library for Python that provides functionality commonly required in engineering and science applications. Its primary goals are 1) to provide fast, interactive graphics for displaying data (plots, video, etc.) and 2) to provide tools to aid in rapid application development (for example, property trees such as used in Qt Designer).
|
||||
PyQtGraph is a graphics and user interface library for Python that provides functionality commonly required in engineering and science applications. Its primary goals are 1) to provide fast, interactive graphics for displaying data (plots, video, etc.) and 2) to provide tools to aid in rapid application development (for example, property trees such as used in Qt Designer).
|
||||
|
||||
Pyqtgraph makes heavy use of the Qt GUI platform (via PyQt or PySide) for its high-performance graphics and numpy for heavy number crunching. In particular, pyqtgraph uses Qt's GraphicsView framework which is a highly capable graphics system on its own; we bring optimized and simplified primitives to this framework to allow data visualization with minimal effort.
|
||||
PyQtGraph makes heavy use of the Qt GUI platform (via PyQt or PySide) for its high-performance graphics and numpy for heavy number crunching. In particular, pyqtgraph uses Qt's GraphicsView framework which is a highly capable graphics system on its own; we bring optimized and simplified primitives to this framework to allow data visualization with minimal effort.
|
||||
|
||||
It is known to run on Linux, Windows, and OSX
|
||||
|
||||
|
@ -33,7 +33,7 @@ Amongst the core features of pyqtgraph are:
|
|||
Examples
|
||||
--------
|
||||
|
||||
Pyqtgraph includes an extensive set of examples that can be accessed by running::
|
||||
PyQtGraph includes an extensive set of examples that can be accessed by running::
|
||||
|
||||
import pyqtgraph.examples
|
||||
pyqtgraph.examples.run()
|
||||
|
|
|
@ -8,7 +8,7 @@ This feature is commonly seen, for example, in user interface design application
|
|||
Parameters generally have a name, a data type (int, float, string, color, etc), and a value matching the data type. Parameters may be grouped and nested
|
||||
to form hierarchies and may be subclassed to provide custom behavior and display widgets.
|
||||
|
||||
Pyqtgraph's parameter tree system works similarly to the model-view architecture used by some components of Qt: Parameters are purely data-handling classes
|
||||
PyQtGraph's parameter tree system works similarly to the model-view architecture used by some components of Qt: Parameters are purely data-handling classes
|
||||
that exist independent of any graphical interface. A ParameterTree is a widget that automatically generates a graphical interface which represents
|
||||
the state of a haierarchy of Parameter objects and allows the user to edit the values within that hierarchy. This separation of data (model) and graphical
|
||||
interface (view) allows the same data to be represented multiple times and in a variety of different ways.
|
||||
|
|
|
@ -28,7 +28,7 @@ All of the above functions also return handles to the objects that are created,
|
|||
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.
|
||||
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)
|
||||
* :class:`PlotCurveItem <pyqtgraph.PlotCurveItem>` - Displays a plot line given x,y data
|
||||
|
|
|
@ -3,7 +3,7 @@ Rapid GUI prototyping
|
|||
|
||||
[Just an overview; documentation is not complete yet]
|
||||
|
||||
Pyqtgraph offers several powerful features which are commonly used in engineering and scientific applications.
|
||||
PyQtGraph offers several powerful features which are commonly used in engineering and scientific applications.
|
||||
|
||||
Parameter Trees
|
||||
---------------
|
||||
|
@ -16,7 +16,7 @@ See the `parametertree documentation <parametertree>`_ for more information.
|
|||
Visual Programming Flowcharts
|
||||
-----------------------------
|
||||
|
||||
Pyqtgraph's flowcharts provide a visual programming environment similar in concept to LabView--functional modules are added to a flowchart and connected by wires to define a more complex and arbitrarily configurable algorithm. A small number of predefined modules (called Nodes) are included with pyqtgraph, but most flowchart developers will want to define their own library of Nodes. At their core, the Nodes are little more than 1) a Python function 2) a list of input/output terminals, and 3) an optional widget providing a control panel for the Node. Nodes may transmit/receive any type of Python object via their terminals.
|
||||
PyQtGraph's flowcharts provide a visual programming environment similar in concept to LabView--functional modules are added to a flowchart and connected by wires to define a more complex and arbitrarily configurable algorithm. A small number of predefined modules (called Nodes) are included with pyqtgraph, but most flowchart developers will want to define their own library of Nodes. At their core, the Nodes are little more than 1) a Python function 2) a list of input/output terminals, and 3) an optional widget providing a control panel for the Node. Nodes may transmit/receive any type of Python object via their terminals.
|
||||
|
||||
See the `flowchart documentation <flowchart>`_ and the flowchart examples for more information.
|
||||
|
||||
|
@ -30,6 +30,6 @@ The Canvas is a system designed to allow the user to add/remove items to a 2D ca
|
|||
Dockable Widgets
|
||||
----------------
|
||||
|
||||
The dockarea system allows the design of user interfaces which can be rearranged by the user at runtime. Docks can be moved, resized, stacked, and torn out of the main window. This is similar in principle to the docking system built into Qt, but offers a more deterministic dock placement API (in Qt it is very difficult to programatically generate complex dock arrangements). Additionally, Qt's docks are designed to be used as small panels around the outer edge of a window. Pyqtgraph's docks were created with the notion that the entire window (or any portion of it) would consist of dockable components.
|
||||
The dockarea system allows the design of user interfaces which can be rearranged by the user at runtime. Docks can be moved, resized, stacked, and torn out of the main window. This is similar in principle to the docking system built into Qt, but offers a more deterministic dock placement API (in Qt it is very difficult to programatically generate complex dock arrangements). Additionally, Qt's docks are designed to be used as small panels around the outer edge of a window. PyQtGraph's docks were created with the notion that the entire window (or any portion of it) would consist of dockable components.
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Qt Crash Course
|
||||
===============
|
||||
|
||||
Pyqtgraph makes extensive use of Qt for generating nearly all of its visual output and interfaces. Qt's documentation is very well written and we encourage all pyqtgraph developers to familiarize themselves with it. The purpose of this section is to provide an introduction to programming with Qt (using either PyQt or PySide) for the pyqtgraph developer.
|
||||
PyQtGraph makes extensive use of Qt for generating nearly all of its visual output and interfaces. Qt's documentation is very well written and we encourage all pyqtgraph developers to familiarize themselves with it. The purpose of this section is to provide an introduction to programming with Qt (using either PyQt or PySide) for the pyqtgraph developer.
|
||||
|
||||
QWidgets and Layouts
|
||||
--------------------
|
||||
|
@ -12,7 +12,7 @@ A Qt GUI is almost always composed of a few basic components:
|
|||
* Multiple QWidget instances such as QPushButton, QLabel, QComboBox, etc.
|
||||
* QLayout instances (optional, but strongly encouraged) which automatically manage the positioning of widgets to allow the GUI to resize in a usable way.
|
||||
|
||||
Pyqtgraph fits into this scheme by providing its own QWidget subclasses to be inserted into your GUI.
|
||||
PyQtGraph fits into this scheme by providing its own QWidget subclasses to be inserted into your GUI.
|
||||
|
||||
|
||||
Example::
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
Interactive Data Selection Controls
|
||||
===================================
|
||||
|
||||
Pyqtgraph includes graphics items which allow the user to select and mark regions of data.
|
||||
PyQtGraph includes graphics items which allow the user to select and mark regions of data.
|
||||
|
||||
Linear Selection and Marking
|
||||
----------------------------
|
||||
|
|
Loading…
Reference in New Issue