.. 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 bouding 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 bouding 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.


