1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. currentmodule:: wx.lib.plot.polyobjects
.. highlight:: python
.. _wx.lib.plot.polyobjects.PolyPoints:
==========================================================================================================================================
|phoenix_title| **wx.lib.plot.polyobjects.PolyPoints**
==========================================================================================================================================
Base Class for lines and markers.
:param points: The points to plot
:type points: list of ``(x, y)`` pairs
:param attr: Additional attributes
:type attr: dict
.. warning::
All methods are private.
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html
<div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
<img id="toggleBlock-trigger" src="_static/images/closed.png"/>
Inheritance diagram for class <strong>PolyPoints</strong>:
</div>
<div id="toggleBlock-summary" style="display:block;"></div>
<div id="toggleBlock-content" style="display:none;">
<p class="graphviz">
<center><img src="_static/images/inheritance/wx.lib.plot.polyobjects.PolyPoints_inheritance.png" alt="Inheritance diagram of PolyPoints" usemap="#dummy" class="inheritance"/></center>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.plot.polyobjects.PolyPoints.html" title="wx.lib.plot.polyobjects.PolyPoints" alt="" coords="5,5,247,35"/> </map>
</p>
</div>
|
|sub_classes| Known Subclasses
==============================
:class:`wx.lib.plot.polyobjects.PolyBarsBase`, :class:`wx.lib.plot.polyobjects.PolyBoxPlot`, :class:`wx.lib.plot.polyobjects.PolyLine`, :class:`wx.lib.plot.polyobjects.PolyMarker`
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.plot.polyobjects.PolyPoints.__init__` Initialize self. See help(type(self)) for accurate signature.
:meth:`~wx.lib.plot.polyobjects.PolyPoints.boundingBox` Returns the bounding box for the entire dataset as a tuple with this
:meth:`~wx.lib.plot.polyobjects.PolyPoints.getClosestPoint` Returns the index of closest point on the curve, pointXY,
:meth:`~wx.lib.plot.polyobjects.PolyPoints.getLegend`
:meth:`~wx.lib.plot.polyobjects.PolyPoints.scaleAndShift` Scales and shifts the data for plotting.
:meth:`~wx.lib.plot.polyobjects.PolyPoints.setLogScale` Set to change the axes to plot Log10(values)
================================================================================ ================================================================================
|
|property_summary| Properties Summary
=====================================
================================================================================ ================================================================================
:attr:`~wx.lib.plot.polyobjects.PolyPoints.absScale` A tuple of ``(x_axis_is_abs, y_axis_is_abs)`` booleans. If a value
:attr:`~wx.lib.plot.polyobjects.PolyPoints.logScale` A tuple of ``(x_axis_is_log10, y_axis_is_log10)`` booleans. If a value
:attr:`~wx.lib.plot.polyobjects.PolyPoints.points` Get or set the plotted points.
:attr:`~wx.lib.plot.polyobjects.PolyPoints.symLogScale` Not yet implemented.
:attr:`~wx.lib.plot.polyobjects.PolyPoints.symLogThresh` Not yet implemented.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: PolyPoints(object)
Base Class for lines and markers.
:param points: The points to plot
:type points: list of ``(x, y)`` pairs
:param attr: Additional attributes
:type attr: dict
.. warning::
All methods are private.
.. method:: __init__(self, points, attr)
Initialize self. See help(type(self)) for accurate signature.
.. method:: boundingBox(self)
Returns the bounding box for the entire dataset as a tuple with this
format::
((minX, minY), (maxX, maxY))
:returns: boundingbox
:rtype: numpy array of ``[[minX, minY], [maxX, maxY]]``
.. method:: getClosestPoint(self, pntXY, pointScaled=True)
Returns the index of closest point on the curve, pointXY,
scaledXY, distance x, y in user coords.
if pointScaled == True, then based on screen coords
if pointScaled == False, then based on user coords
.. method:: getLegend(self)
.. method:: scaleAndShift(self, scale=(1, 1), shift=(0, 0))
Scales and shifts the data for plotting.
:param scale: The values to scale the data by.
:type scale: list of floats: ``[x_scale, y_scale]``
:param shift: The value to shift the data by. This should be in scaled
units
:type shift: list of floats: ``[x_shift, y_shift]``
:returns: None
.. method:: setLogScale(self, logscale)
Set to change the axes to plot Log10(values)
Value must be a tuple of booleans (x_axis_bool, y_axis_bool)
.. deprecated:: Feb 27, 2016
Use the :attr:`~wx.lib.plot.polyobjects.PolyPoints.logScale`
property instead.
.. attribute:: absScale
A tuple of ``(x_axis_is_abs, y_axis_is_abs)`` booleans. If a value
is ``True``, then that axis is plotted on an absolute value scale.
:getter: Returns the current value of absScale
:setter: Sets the value of absScale
:type: tuple of bool, length 2
:raises ValueError: when setting an invalid value
.. attribute:: logScale
A tuple of ``(x_axis_is_log10, y_axis_is_log10)`` booleans. If a value
is ``True``, then that axis is plotted on a logarithmic base 10 scale.
:getter: Returns the current value of logScale
:setter: Sets the value of logScale
:type: tuple of bool, length 2
:raises ValueError: when setting an invalid value
.. attribute:: points
Get or set the plotted points.
:getter: Returns the current value of points, adjusting for the
various scale options such as Log, Abs, or SymLog.
:setter: Sets the value of points.
:type: list of `(x, y)` pairs
.. Note::
Only set unscaled points - do not perform the log, abs, or symlog
adjustments yourself.
.. attribute:: symLogScale
.. warning::
Not yet implemented.
A tuple of ``(x_axis_is_SymLog10, y_axis_is_SymLog10)`` booleans.
If a value is ``True``, then that axis is plotted on a symmetric
logarithmic base 10 scale.
A Symmetric Log10 scale means that values can be positive and
negative. Any values less than
:attr:`~wx.lig.plot.PolyPoints.symLogThresh` will be plotted on
a linear scale to avoid the plot going to infinity near 0.
:getter: Returns the current value of symLogScale
:setter: Sets the value of symLogScale
:type: tuple of bool, length 2
:raises ValueError: when setting an invalid value
.. notes::
This is a simplified example of how SymLog works::
if x >= thresh:
x = Log10(x)
elif x =< thresh:
x = -Log10(Abs(x))
else:
x = x
.. seealso::
+ :attr:`~wx.lib.plot.PolyPoints.symLogThresh`
+ See http://matplotlib.org/examples/pylab_examples/symlog_demo.html
for an example.
.. attribute:: symLogThresh
.. warning::
Not yet implemented.
A tuple of ``(x_thresh, y_thresh)`` floats that define where the plot
changes to linear scale when using a symmetric log scale.
:getter: Returns the current value of symLogThresh
:setter: Sets the value of symLogThresh
:type: tuple of float, length 2
:raises ValueError: when setting an invalid value
.. notes::
This is a simplified example of how SymLog works::
if x >= thresh:
x = Log10(x)
elif x =< thresh:
x = -Log10(Abs(x))
else:
x = x
.. seealso::
+ :attr:`~wx.lib.plot.PolyPoints.symLogScale`
+ See http://matplotlib.org/examples/pylab_examples/symlog_demo.html
for an example.
|