-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from wpfff/feature/plotwidgets
Feature/plotwidgets
- Loading branch information
Showing
38 changed files
with
2,867 additions
and
463 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
API documentation | ||
================= | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
:caption: Contents: | ||
|
||
node | ||
plot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Node and Flowchart core elements | ||
-------------------------------- | ||
|
||
Node essentials: the node module | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
.. automodule:: plottr.node.node | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Plotting elements | ||
----------------- | ||
|
||
Base elements | ||
^^^^^^^^^^^^^ | ||
.. automodule:: plottr.plot.base | ||
:members: | ||
|
||
Matplotlib plotting tools | ||
^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
.. automodule:: plottr.plot.mpl | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# Configuration file for the Sphinx documentation builder. | ||
# | ||
# This file only contains a selection of the most common options. For a full | ||
# list see the documentation: | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
|
||
# -- Path setup -------------------------------------------------------------- | ||
|
||
# If extensions (or modules to document with autodoc) are in another directory, | ||
# add these directories to sys.path here. If the directory is relative to the | ||
# documentation root, use os.path.abspath to make it absolute, like shown here. | ||
# | ||
# import os | ||
# import sys | ||
# sys.path.insert(0, os.path.abspath('.')) | ||
|
||
|
||
# -- Project information ----------------------------------------------------- | ||
|
||
project = 'plottr' | ||
copyright = '2020, Wolfgang Pfaff' | ||
author = 'Wolfgang Pfaff' | ||
|
||
|
||
# -- General configuration --------------------------------------------------- | ||
|
||
# Add any Sphinx extension module names here, as strings. They can be | ||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
# ones. | ||
extensions = [ | ||
'sphinx.ext.autodoc', | ||
'sphinx.ext.napoleon', | ||
'sphinx_autodoc_typehints', | ||
'sphinx.ext.todo', | ||
'sphinx.ext.mathjax', | ||
] | ||
napoleon_use_param = True | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
templates_path = ['_templates'] | ||
|
||
# List of patterns, relative to source directory, that match files and | ||
# directories to ignore when looking for source files. | ||
# This pattern also affects html_static_path and html_extra_path. | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
|
||
# The theme to use for HTML and HTML Help pages. See the documentation for | ||
# a list of builtin themes. | ||
# | ||
html_theme = 'sphinx_rtd_theme' | ||
|
||
# Add any paths that contain custom static files (such as style sheets) here, | ||
# relative to this directory. They are copied after the builtin static files, | ||
# so a file named "default.css" will overwrite the builtin "default.css". | ||
html_static_path = ['_static'] |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Plotting | ||
======== | ||
|
||
Plot Nodes | ||
---------- | ||
Plots have a somewhat special role in the node system: | ||
We need a node to make plots aware of incoming data, but the node will (typically) not do anything to the data. | ||
In the simplest case, :meth:`Node.process <plottr.node.node.Node.process>` will just call a function that triggers plotting, using the just received data. | ||
For many applications the base class :class:`PlotNode <plottr.plot.base.PlotNode>` will do the job without any need to customize. | ||
|
||
|
||
Plot Widgets | ||
------------ | ||
To make the plot node aware of the presence of a GUI, a suitable widget must be connected to it. | ||
This can be done by instantiating :class:`PlotWidgetContainer <plottr.plot.base.PlotWidgetContainer>`, and passing the instance to the node's :meth:`setPlotWidgetContainer <plottr.plot.base.PlotWidgetContainer.setPlotWidgetContainer>` method. | ||
This will make sure that the container's :meth:`setData <plottr.plot.base.PlotWidgetContainer.setData>` is called whenever the node receives data. | ||
The container can then in turn host a :class:`PlotWidgetContainer <plottr.plot.base.PlotWidget>`, which is connected by using :meth:`setPlotWidget <plottr.plot.base.PlotWidgetContainer.setPlotWidget>`. | ||
The reason why we don't connect the widget directly to the node is that the container may provide controls to change the widgets through user controls. | ||
|
||
.. image:: img/plot-node-system.png | ||
|
||
|
||
Automatic plotting with Matplotlib | ||
---------------------------------- | ||
The most commonly used plot widget is based on matplotlib: :class:`AutoPlot <plottr.plot.mpl.AutoPlot>`. | ||
It determines automatically what an appropriate visualization of the received data is, and then plots that (at least if it can determine a good way to plot). | ||
At the same time it gives the user a little bit of control over the appearance (partially through native matplotlib tools). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
sphinx==2.4.4 | ||
sphinx-autodoc-typehints>=1.10.3 | ||
PyQt5>=5.9.0 |
Oops, something went wrong.