289 lines
11 KiB
HTML
289 lines
11 KiB
HTML
|
||
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
||
<title>PlotDataItem — pyqtgraph v1.8 documentation</title>
|
||
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
|
||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||
<script type="text/javascript">
|
||
var DOCUMENTATION_OPTIONS = {
|
||
URL_ROOT: '../',
|
||
VERSION: '1.8',
|
||
COLLAPSE_INDEX: false,
|
||
FILE_SUFFIX: '.html',
|
||
HAS_SOURCE: true
|
||
};
|
||
</script>
|
||
<script type="text/javascript" src="../_static/jquery.js"></script>
|
||
<script type="text/javascript" src="../_static/underscore.js"></script>
|
||
<script type="text/javascript" src="../_static/doctools.js"></script>
|
||
<link rel="top" title="pyqtgraph v1.8 documentation" href="../index.html" />
|
||
<link rel="up" title="Pyqtgraph’s Graphics Items" href="index.html" />
|
||
<link rel="next" title="PlotCurveItem" href="plotcurveitem.html" />
|
||
<link rel="prev" title="Pyqtgraph’s Graphics Items" href="index.html" />
|
||
</head>
|
||
<body>
|
||
<div class="related">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../genindex.html" title="General Index"
|
||
accesskey="I">index</a></li>
|
||
<li class="right" >
|
||
<a href="../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="plotcurveitem.html" title="PlotCurveItem"
|
||
accesskey="N">next</a> |</li>
|
||
<li class="right" >
|
||
<a href="index.html" title="Pyqtgraph’s Graphics Items"
|
||
accesskey="P">previous</a> |</li>
|
||
<li><a href="../index.html">pyqtgraph v1.8 documentation</a> »</li>
|
||
<li><a href="../apireference.html" >API Reference</a> »</li>
|
||
<li><a href="index.html" accesskey="U">Pyqtgraph’s Graphics Items</a> »</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body">
|
||
|
||
<div class="section" id="plotdataitem">
|
||
<h1>PlotDataItem<a class="headerlink" href="#plotdataitem" title="Permalink to this headline">¶</a></h1>
|
||
<dl class="class">
|
||
<dt id="pyqtgraph.PlotDataItem">
|
||
<em class="property">class </em><tt class="descclassname">pyqtgraph.</tt><tt class="descname">PlotDataItem</tt><big>(</big><em>*args</em>, <em>**kargs</em><big>)</big><a class="headerlink" href="#pyqtgraph.PlotDataItem" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>GraphicsItem for displaying plot curves, scatter plots, or both.</p>
|
||
<dl class="method">
|
||
<dt id="pyqtgraph.PlotDataItem.__init__">
|
||
<tt class="descname">__init__</tt><big>(</big><em>*args</em>, <em>**kargs</em><big>)</big><a class="headerlink" href="#pyqtgraph.PlotDataItem.__init__" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>There are many different ways to create a PlotDataItem:</p>
|
||
<p>Data initialization: (x,y data only)</p>
|
||
<blockquote>
|
||
<table border="1" class="docutils">
|
||
<colgroup>
|
||
<col width="33%" />
|
||
<col width="67%" />
|
||
</colgroup>
|
||
<tbody valign="top">
|
||
<tr><td>PlotDataItem(xValues, yValues)</td>
|
||
<td>x and y values may be any sequence (including ndarray) of real numbers</td>
|
||
</tr>
|
||
<tr><td>PlotDataItem(yValues)</td>
|
||
<td>y values only – x will be automatically set to range(len(y))</td>
|
||
</tr>
|
||
<tr><td>PlotDataItem(x=xValues, y=yValues)</td>
|
||
<td>x and y given by keyword arguments</td>
|
||
</tr>
|
||
<tr><td>PlotDataItem(ndarray(Nx2))</td>
|
||
<td>numpy array with shape (N, 2) where x=data[:,0] and y=data[:,1]</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</blockquote>
|
||
<p>Data initialization: (x,y data AND may include spot style)</p>
|
||
<blockquote>
|
||
<table border="1" class="docutils">
|
||
<colgroup>
|
||
<col width="32%" />
|
||
<col width="68%" />
|
||
</colgroup>
|
||
<tbody valign="top">
|
||
<tr><td>PlotDataItem(recarray)</td>
|
||
<td>numpy array with dtype=[(‘x’, float), (‘y’, float), ...]</td>
|
||
</tr>
|
||
<tr><td>PlotDataItem(list-of-dicts)</td>
|
||
<td>[{‘x’: x, ‘y’: y, ...}, ...]</td>
|
||
</tr>
|
||
<tr><td>PlotDataItem(dict-of-lists)</td>
|
||
<td>{‘x’: [...], ‘y’: [...], ...}</td>
|
||
</tr>
|
||
<tr><td>PlotDataItem(MetaArray)</td>
|
||
<td>1D array of Y values with X sepecified as axis values
|
||
OR 2D array with a column ‘y’ and extra columns as needed.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</blockquote>
|
||
<p>Line style keyword arguments:</p>
|
||
<blockquote>
|
||
<table border="1" class="docutils">
|
||
<colgroup>
|
||
<col width="8%" />
|
||
<col width="92%" />
|
||
</colgroup>
|
||
<tbody valign="top">
|
||
<tr><td>pen</td>
|
||
<td>pen to use for drawing line between points. Default is solid grey, 1px width. Use None to disable line drawing.</td>
|
||
</tr>
|
||
<tr><td>shadowPen</td>
|
||
<td>pen for secondary line to draw behind the primary line. disabled by default.</td>
|
||
</tr>
|
||
<tr><td>fillLevel</td>
|
||
<td>fill the area between the curve and fillLevel</td>
|
||
</tr>
|
||
<tr><td>fillBrush</td>
|
||
<td>fill to use when fillLevel is specified</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</blockquote>
|
||
<p>Point style keyword arguments:</p>
|
||
<blockquote>
|
||
<table border="1" class="docutils">
|
||
<colgroup>
|
||
<col width="12%" />
|
||
<col width="88%" />
|
||
</colgroup>
|
||
<tbody valign="top">
|
||
<tr><td>symbol</td>
|
||
<td>symbol to use for drawing points OR list of symbols, one per point. Default is no symbol.
|
||
options are o, s, t, d, +</td>
|
||
</tr>
|
||
<tr><td>symbolPen</td>
|
||
<td>outline pen for drawing points OR list of pens, one per point</td>
|
||
</tr>
|
||
<tr><td>symbolBrush</td>
|
||
<td>brush for filling points OR list of brushes, one per point</td>
|
||
</tr>
|
||
<tr><td>symbolSize</td>
|
||
<td>diameter of symbols OR list of diameters</td>
|
||
</tr>
|
||
<tr><td>pxMode</td>
|
||
<td>(bool) If True, then symbolSize is specified in pixels. If False, then symbolSize is
|
||
specified in data coordinates.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</blockquote>
|
||
<p>Optimization keyword arguments:</p>
|
||
<blockquote>
|
||
<table border="1" class="docutils">
|
||
<colgroup>
|
||
<col width="10%" />
|
||
<col width="90%" />
|
||
</colgroup>
|
||
<tbody valign="top">
|
||
<tr><td>identical</td>
|
||
<td>spots are all identical. The spot image will be rendered only once and repeated for every point</td>
|
||
</tr>
|
||
<tr><td>decimate</td>
|
||
<td>(int) decimate data</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</blockquote>
|
||
<p>Meta-info keyword arguments:</p>
|
||
<blockquote>
|
||
<table border="1" class="docutils">
|
||
<colgroup>
|
||
<col width="17%" />
|
||
<col width="83%" />
|
||
</colgroup>
|
||
<tbody valign="top">
|
||
<tr><td>name</td>
|
||
<td>name of dataset. This would appear in a legend</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</blockquote>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="pyqtgraph.PlotDataItem.setData">
|
||
<tt class="descname">setData</tt><big>(</big><em>*args</em>, <em>**kargs</em><big>)</big><a class="headerlink" href="#pyqtgraph.PlotDataItem.setData" title="Permalink to this definition">¶</a></dt>
|
||
<dd><p>Clear any data displayed by this item and display new data.
|
||
See <a class="reference internal" href="#pyqtgraph.PlotDataItem.__init__" title="pyqtgraph.PlotDataItem.__init__"><tt class="xref py py-func docutils literal"><span class="pre">__init__()</span></tt></a> for details; it accepts the same arguments.</p>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="pyqtgraph.PlotDataItem.setPen">
|
||
<tt class="descname">setPen</tt><big>(</big><em>pen</em><big>)</big><a class="headerlink" href="#pyqtgraph.PlotDataItem.setPen" title="Permalink to this definition">¶</a></dt>
|
||
<dd><div class="line-block">
|
||
<div class="line">Sets the pen used to draw lines between points.</div>
|
||
<div class="line"><em>pen</em> can be a QPen or any argument accepted by <a class="reference internal" href="../functions.html#pyqtgraph.mkPen" title="pyqtgraph.mkPen"><tt class="xref py py-func docutils literal"><span class="pre">pyqtgraph.mkPen()</span></tt></a></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
<dl class="method">
|
||
<dt id="pyqtgraph.PlotDataItem.setShadowPen">
|
||
<tt class="descname">setShadowPen</tt><big>(</big><em>pen</em><big>)</big><a class="headerlink" href="#pyqtgraph.PlotDataItem.setShadowPen" title="Permalink to this definition">¶</a></dt>
|
||
<dd><div class="line-block">
|
||
<div class="line">Sets the shadow pen used to draw lines between points (this is for enhancing contrast or
|
||
emphacizing data). </div>
|
||
<div class="line">This line is drawn behind the primary pen (see <a class="reference internal" href="#pyqtgraph.PlotDataItem.setPen" title="pyqtgraph.PlotDataItem.setPen"><tt class="xref py py-func docutils literal"><span class="pre">setPen()</span></tt></a>)
|
||
and should generally be assigned greater width than the primary pen.</div>
|
||
<div class="line"><em>pen</em> can be a QPen or any argument accepted by <a class="reference internal" href="../functions.html#pyqtgraph.mkPen" title="pyqtgraph.mkPen"><tt class="xref py py-func docutils literal"><span class="pre">pyqtgraph.mkPen()</span></tt></a></div>
|
||
</div>
|
||
</dd></dl>
|
||
|
||
</dd></dl>
|
||
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar">
|
||
<div class="sphinxsidebarwrapper">
|
||
<h4>Previous topic</h4>
|
||
<p class="topless"><a href="index.html"
|
||
title="previous chapter">Pyqtgraph’s Graphics Items</a></p>
|
||
<h4>Next topic</h4>
|
||
<p class="topless"><a href="plotcurveitem.html"
|
||
title="next chapter">PlotCurveItem</a></p>
|
||
<h3>This Page</h3>
|
||
<ul class="this-page-menu">
|
||
<li><a href="../_sources/graphicsItems/plotdataitem.txt"
|
||
rel="nofollow">Show Source</a></li>
|
||
</ul>
|
||
<div id="searchbox" style="display: none">
|
||
<h3>Quick search</h3>
|
||
<form class="search" action="../search.html" method="get">
|
||
<input type="text" name="q" size="18" />
|
||
<input type="submit" value="Go" />
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
<p class="searchtip" style="font-size: 90%">
|
||
Enter search terms or a module, class or function name.
|
||
</p>
|
||
</div>
|
||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="related">
|
||
<h3>Navigation</h3>
|
||
<ul>
|
||
<li class="right" style="margin-right: 10px">
|
||
<a href="../genindex.html" title="General Index"
|
||
>index</a></li>
|
||
<li class="right" >
|
||
<a href="../py-modindex.html" title="Python Module Index"
|
||
>modules</a> |</li>
|
||
<li class="right" >
|
||
<a href="plotcurveitem.html" title="PlotCurveItem"
|
||
>next</a> |</li>
|
||
<li class="right" >
|
||
<a href="index.html" title="Pyqtgraph’s Graphics Items"
|
||
>previous</a> |</li>
|
||
<li><a href="../index.html">pyqtgraph v1.8 documentation</a> »</li>
|
||
<li><a href="../apireference.html" >API Reference</a> »</li>
|
||
<li><a href="index.html" >Pyqtgraph’s Graphics Items</a> »</li>
|
||
</ul>
|
||
</div>
|
||
<div class="footer">
|
||
© Copyright 2011, Luke Campagnola.
|
||
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
|
||
</div>
|
||
</body>
|
||
</html> |