2015-07-12 16:46:12 +00:00
|
|
|
from __future__ import division, print_function, absolute_import
|
|
|
|
import os
|
|
|
|
from pyqtgraph.pgcollections import OrderedDict
|
|
|
|
from pyqtgraph.python2_3 import basestring
|
|
|
|
|
|
|
|
path = os.path.abspath(os.path.dirname(__file__))
|
|
|
|
|
|
|
|
|
|
|
|
examples = OrderedDict([
|
|
|
|
('Command-line usage', 'CLIexample.py'),
|
|
|
|
('Basic Plotting', 'Plotting.py'),
|
|
|
|
('ImageView', 'ImageView.py'),
|
|
|
|
('ParameterTree', 'parametertree.py'),
|
|
|
|
('Crosshair / Mouse interaction', 'crosshair.py'),
|
|
|
|
('Data Slicing', 'DataSlicing.py'),
|
|
|
|
('Plot Customization', 'customPlot.py'),
|
|
|
|
('Image Analysis', 'imageAnalysis.py'),
|
2019-06-08 15:07:47 +00:00
|
|
|
('ViewBox Features', 'ViewBoxFeatures.py'),
|
2015-07-12 16:46:12 +00:00
|
|
|
('Dock widgets', 'dockarea.py'),
|
2019-06-08 15:07:47 +00:00
|
|
|
('Console', 'ConsoleWidget.py'),
|
2015-07-12 16:46:12 +00:00
|
|
|
('Histograms', 'histogram.py'),
|
|
|
|
('Beeswarm plot', 'beeswarm.py'),
|
2016-02-15 07:15:39 +00:00
|
|
|
('Symbols', 'Symbols.py'),
|
2015-07-12 16:46:12 +00:00
|
|
|
('Auto-range', 'PlotAutoRange.py'),
|
|
|
|
('Remote Plotting', 'RemoteSpeedTest.py'),
|
|
|
|
('Scrolling plots', 'scrollingPlots.py'),
|
|
|
|
('HDF5 big data', 'hdf5.py'),
|
|
|
|
('Demos', OrderedDict([
|
|
|
|
('Optics', 'optics_demos.py'),
|
|
|
|
('Special relativity', 'relativity_demo.py'),
|
|
|
|
('Verlet chain', 'verlet_chain_demo.py'),
|
2017-10-18 07:26:37 +00:00
|
|
|
('Koch Fractal', 'fractal.py'),
|
2015-07-12 16:46:12 +00:00
|
|
|
])),
|
|
|
|
('GraphicsItems', OrderedDict([
|
|
|
|
('Scatter Plot', 'ScatterPlot.py'),
|
|
|
|
#('PlotItem', 'PlotItem.py'),
|
|
|
|
('IsocurveItem', 'isocurve.py'),
|
|
|
|
('GraphItem', 'GraphItem.py'),
|
|
|
|
('ErrorBarItem', 'ErrorBarItem.py'),
|
|
|
|
('FillBetweenItem', 'FillBetweenItem.py'),
|
|
|
|
('ImageItem - video', 'ImageItem.py'),
|
|
|
|
('ImageItem - draw', 'Draw.py'),
|
|
|
|
('Region-of-Interest', 'ROIExamples.py'),
|
|
|
|
('Bar Graph', 'BarGraphItem.py'),
|
|
|
|
('GraphicsLayout', 'GraphicsLayout.py'),
|
|
|
|
('LegendItem', 'Legend.py'),
|
|
|
|
('Text Item', 'text.py'),
|
|
|
|
('Linked Views', 'linkedViews.py'),
|
|
|
|
('Arrow', 'Arrow.py'),
|
2018-07-10 12:56:35 +00:00
|
|
|
('ViewBox', 'ViewBoxFeatures.py'),
|
2015-07-12 16:46:12 +00:00
|
|
|
('Custom Graphics', 'customGraphicsItem.py'),
|
|
|
|
('Labeled Graph', 'CustomGraphItem.py'),
|
|
|
|
])),
|
|
|
|
('Benchmarks', OrderedDict([
|
|
|
|
('Video speed test', 'VideoSpeedTest.py'),
|
|
|
|
('Line Plot update', 'PlotSpeedTest.py'),
|
|
|
|
('Scatter Plot update', 'ScatterPlotSpeedTest.py'),
|
|
|
|
('Multiple plots', 'MultiPlotSpeedTest.py'),
|
|
|
|
])),
|
|
|
|
('3D Graphics', OrderedDict([
|
|
|
|
('Volumetric', 'GLVolumeItem.py'),
|
|
|
|
('Isosurface', 'GLIsosurface.py'),
|
|
|
|
('Surface Plot', 'GLSurfacePlot.py'),
|
|
|
|
('Scatter Plot', 'GLScatterPlotItem.py'),
|
|
|
|
('Shaders', 'GLshaders.py'),
|
|
|
|
('Line Plot', 'GLLinePlotItem.py'),
|
|
|
|
('Mesh', 'GLMeshItem.py'),
|
|
|
|
('Image', 'GLImageItem.py'),
|
|
|
|
])),
|
|
|
|
('Widgets', OrderedDict([
|
|
|
|
('PlotWidget', 'PlotWidget.py'),
|
|
|
|
('SpinBox', 'SpinBox.py'),
|
|
|
|
('ConsoleWidget', 'ConsoleWidget.py'),
|
|
|
|
('Histogram / lookup table', 'HistogramLUT.py'),
|
|
|
|
('TreeWidget', 'TreeWidget.py'),
|
|
|
|
('ScatterPlotWidget', 'ScatterPlotWidget.py'),
|
|
|
|
('DataTreeWidget', 'DataTreeWidget.py'),
|
|
|
|
('GradientWidget', 'GradientWidget.py'),
|
|
|
|
('TableWidget', 'TableWidget.py'),
|
|
|
|
('ColorButton', 'ColorButton.py'),
|
|
|
|
#('CheckTable', '../widgets/CheckTable.py'),
|
|
|
|
#('VerticalLabel', '../widgets/VerticalLabel.py'),
|
|
|
|
('JoystickButton', 'JoystickButton.py'),
|
|
|
|
])),
|
|
|
|
('Flowcharts', 'Flowchart.py'),
|
|
|
|
('Custom Flowchart Nodes', 'FlowchartCustomNode.py'),
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
def buildFileList(examples, files=None):
|
|
|
|
if files == None:
|
|
|
|
files = []
|
|
|
|
for key, val in examples.items():
|
|
|
|
#item = QtGui.QTreeWidgetItem([key])
|
|
|
|
if isinstance(val, basestring):
|
|
|
|
#item.file = val
|
|
|
|
files.append((key,val))
|
|
|
|
else:
|
|
|
|
buildFileList(val, files)
|
|
|
|
return files
|