.. 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.plotcanvas .. highlight:: python .. _wx.lib.plot.plotcanvas.PlotCanvas: ========================================================================================================================================== |phoenix_title| **wx.lib.plot.plotcanvas.PlotCanvas** ========================================================================================================================================== Creates a PlotCanvas object. Subclass of a wx.Panel which holds two scrollbars and the actual plotting canvas (self.canvas). It allows for simple general plotting of data with zoom, labels, and automatic axis scaling. This is the main window that you will want to import into your application. Parameters for ``__init__`` are the same as any :class:`wx.Panel`. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class PlotCanvas:
| |super_classes| Known Superclasses ================================== :class:`wx.Panel` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.__init__` Initialize self. See help(type(self)) for accurate signature. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.Clear` Erase the window. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.Draw` Wrapper around _Draw, which handles log axes :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetClosestPoint` Returns list with :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetClosestPoints` Returns list with :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetEnableAntiAliasing` Get the enableAntiAliasing value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetEnableCenterLines` Get the enableCenterLines value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetEnableDiagonals` Get the enableDiagonals value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetEnableDrag` Get the enableDrag value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetEnableGrid` Get the enableGrid value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetEnableHiRes` Get the enableHiRes value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetEnableLegend` Get the enableLegend value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetEnablePointLabel` Set the enablePointLabel value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetEnableTitle` Get the enableTitle value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetEnableZoom` Get the enableZoom value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetFontSizeAxis` Get current tick and axis label font size in points :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetFontSizeLegend` Get legend font size (default is 7 point) :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetFontSizeTitle` Get Title font size (default is 15 point) :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.getLogScale` Set the log scale boolean value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetPointLabelFunc` Get the enablePointLabel value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetShowScrollbars` Get the showScrollbars value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetUseScientificNotation` Get the useScientificNotation value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetXCurrentRange` Get the xCurrentRange value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetXMaxRange` Get the xMaxRange value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetXSpec` Get the xSpec value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetXY` Wrapper around _getXY, which handles log scales :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetYCurrentRange` Get the yCurrentRange value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetYMaxRange` Get the yMaxRange value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.GetYSpec` Get the ySpec value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.OnLeave` Used to erase pointLabel when mouse outside window :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.OnMotion` :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.OnMouseDoubleClick` :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.OnMouseLeftDown` :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.OnMouseLeftUp` :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.OnMouseRightDown` :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.OnPaint` :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.OnScroll` :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.OnSize` :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.PageSetup` Brings up the page setup dialog :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.PositionScreenToUser` Converts Screen position to User Coordinates :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.PositionUserToScreen` Converts User position to Screen Coordinates :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.Printout` Print current plot. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.PrintPreview` Print-preview current plot. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.Redraw` Redraw the existing plot. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.Reset` Unzoom the plot. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SaveFile` Saves the file to the type specified in the extension. If no file :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.ScrollRight` Move view right number of axis units. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.ScrollUp` Move view up number of axis units. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetCursor` SetCursor(cursor) -> bool :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetEnableAntiAliasing` Set the enableAntiAliasing value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetEnableCenterLines` Set the enableCenterLines value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetEnableDiagonals` Set the enableDiagonals value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetEnableDrag` Set the enableDrag value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetEnableGrid` Set the enableGrid value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetEnableHiRes` Set the enableHiRes value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetEnableLegend` Set the enableLegend value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetEnablePointLabel` Set the enablePointLabel value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetEnableTitle` Set the enableTitle value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetEnableZoom` Set the enableZoom value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetFontSizeAxis` Set the tick and axis label font size (default is 10 point) :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetFontSizeLegend` Set legend font size (default is 7 point) :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetFontSizeTitle` Set Title font size (default is 15 point) :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.setLogScale` Set the log scale boolean value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetPointLabelFunc` Set the enablePointLabel value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetShowScrollbars` Set the showScrollbars value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetUseScientificNotation` Set the useScientificNotation value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetXSpec` Set the xSpec value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.SetYSpec` Set the ySpec value. :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.UpdatePointLabel` Updates the pointLabel point on screen with data contained in :meth:`~wx.lib.plot.plotcanvas.PlotCanvas.Zoom` Zoom on the plot ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.absScale` The absScale value as a 2-tuple of bools :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.axesPen` The :class:`wx.Pen` used to draw the axes lines on the plot. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.centerLinePen` The :class:`wx.Pen` used to draw the center lines on the plot. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.diagonalPen` The :class:`wx.Pen` used to draw the diagonal lines on the plot. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableAntiAliasing` The current enableAntiAliasing value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableAxes` The current enableAxes value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableAxesLabels` The current enableAxesLabels value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableAxesValues` The current enableAxesValues value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableCenterLines` The current enableCenterLines value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableDiagonals` The current enableDiagonals value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableDrag` The current enableDrag value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableGrid` The current enableGrid value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableHiRes` The current enableHiRes value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableLegend` The current enableLegend value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enablePlotTitle` The current enablePlotTitle value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enablePointLabel` The current enablePointLabel value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableTicks` The current enableTicks value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableTitle` The current enableTitle value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableXAxisLabel` The current enableXAxisLabel value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableYAxisLabel` The current enableYAxisLabel value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableZoom` The current enableZoom value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.fontSizeAxis` The current tick and axis label font size in points. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.fontSizeLegend` The current Legned font size in points. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.fontSizeTitle` The current Title font size in points. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.gridPen` The :class:`wx.Pen` used to draw the grid lines on the plot. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.logScale` The logScale value as a 2-tuple of bools :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.pageSetupData` :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.pointLabelFunc` The current pointLabelFunc value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.print_data` :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.showScrollbars` The current showScrollbars value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.tickLength` The length of the tick marks on an axis. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.tickLengthPrinterScale` :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.tickPen` The :class:`wx.Pen` used to draw the tick marks on the plot. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.useScientificNotation` The current useScientificNotation value. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.xCurrentRange` The plots' X range of the currently displayed portion as :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.xMaxRange` The plots' maximum X range as a tuple of ``(min, max)``. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.xSpec` Defines the X axis type. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.yCurrentRange` The plots' Y range of the currently displayed portion as :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.yMaxRange` The plots' maximum Y range as a tuple of ``(min, max)``. :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.ySpec` Defines the Y axis type. ================================================================================ ================================================================================ | |api| Class API =============== .. class:: PlotCanvas(wx.Panel) Creates a PlotCanvas object. Subclass of a wx.Panel which holds two scrollbars and the actual plotting canvas (self.canvas). It allows for simple general plotting of data with zoom, labels, and automatic axis scaling. This is the main window that you will want to import into your application. Parameters for ``__init__`` are the same as any :class:`wx.Panel`. .. method:: __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, name="plotCanvas") Initialize self. See help(type(self)) for accurate signature. .. method:: Clear(self) Erase the window. .. method:: Draw(self, graphics, xAxis=None, yAxis=None, dc=None) Wrapper around _Draw, which handles log axes .. method:: GetClosestPoint(self, pntXY, pointScaled=True) Returns list with [curveNumber, legend, index of closest point, pointXY, scaledXY, distance] list for only the closest curve. Returns [] if no curves are being plotted. x, y in user coords if pointScaled == ``True`` based on screen coords if pointScaled == ``False`` based on user coords .. method:: GetClosestPoints(self, pntXY, pointScaled=True) Returns list with [curveNumber, legend, index of closest point, pointXY, scaledXY, distance] list for each curve. Returns [] if no curves are being plotted. x, y in user coords if pointScaled == ``True`` based on screen coords if pointScaled == ``False`` based on user coords .. method:: GetEnableAntiAliasing(self) Get the enableAntiAliasing value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableAntiAliasing` property instead. .. method:: GetEnableCenterLines(self) Get the enableCenterLines value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableCenterLines` property instead. .. method:: GetEnableDiagonals(self) Get the enableDiagonals value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableDiagonals` property instead. .. method:: GetEnableDrag(self) Get the enableDrag value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableDrag` property instead. .. method:: GetEnableGrid(self) Get the enableGrid value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableGrid` property instead. .. method:: GetEnableHiRes(self) Get the enableHiRes value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableHiRes` property instead. .. method:: GetEnableLegend(self) Get the enableLegend value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableLegend` property instead. .. method:: GetEnablePointLabel(self) Set the enablePointLabel value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enablePointLabel` property instead. .. method:: GetEnableTitle(self) Get the enableTitle value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableTitle` property instead. .. method:: GetEnableZoom(self) Get the enableZoom value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableZoom` property instead. .. method:: GetFontSizeAxis(self) Get current tick and axis label font size in points .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.fontSizeAxis` property instead. .. method:: GetFontSizeLegend(self) Get legend font size (default is 7 point) .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.fontSizeLegend' property instead. .. method:: GetFontSizeTitle(self) Get Title font size (default is 15 point) .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.fontSizeTitle` property instead. .. method:: getLogScale(self) Set the log scale boolean value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.logScale` property instead. .. method:: GetPointLabelFunc(self) Get the enablePointLabel value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enablePointLabel` property instead. .. method:: GetShowScrollbars(self) Get the showScrollbars value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.showScrollbars` property instead. .. method:: GetUseScientificNotation(self) Get the useScientificNotation value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.useScientificNotation` property instead. .. method:: GetXCurrentRange(self) Get the xCurrentRange value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.xCurrentRange` property instead. .. method:: GetXMaxRange(self) Get the xMaxRange value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.xMaxRange` property instead. .. method:: GetXSpec(self) Get the xSpec value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.xSpec` property instead. .. method:: GetXY(self, event) Wrapper around _getXY, which handles log scales .. method:: GetYCurrentRange(self) Get the yCurrentRange value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.yCurrentRange` property instead. .. method:: GetYMaxRange(self) Get the yMaxRange value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.yMaxRange` property instead. .. method:: GetYSpec(self) Get the ySpec value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.ySpec` property instead. .. method:: OnLeave(self, event) Used to erase pointLabel when mouse outside window .. method:: OnMotion(self, event) .. method:: OnMouseDoubleClick(self, event) .. method:: OnMouseLeftDown(self, event) .. method:: OnMouseLeftUp(self, event) .. method:: OnMouseRightDown(self, event) .. method:: OnPaint(self, event) .. method:: OnScroll(self, evt) .. method:: OnSize(self, event) .. method:: PageSetup(self) Brings up the page setup dialog .. method:: PositionScreenToUser(self, pntXY) Converts Screen position to User Coordinates .. method:: PositionUserToScreen(self, pntXY) Converts User position to Screen Coordinates .. method:: Printout(self, paper=None) Print current plot. .. method:: PrintPreview(self) Print-preview current plot. .. method:: Redraw(self, dc=None) Redraw the existing plot. .. method:: Reset(self) Unzoom the plot. .. method:: SaveFile(self, fileName='') Saves the file to the type specified in the extension. If no file name is specified a dialog box is provided. Returns ``True`` if successful, otherwise False. .bmp Save a Windows bitmap file. .xbm Save an X bitmap file. .xpm Save an XPM bitmap file. .png Save a Portable Network Graphics file. .jpg Save a Joint Photographic Experts Group file. .. method:: ScrollRight(self, units) Move view right number of axis units. .. method:: ScrollUp(self, units) Move view up number of axis units. .. method:: SetCursor(self, cursor) SetCursor(cursor) -> bool Sets the window's cursor. .. method:: SetEnableAntiAliasing(self, enableAntiAliasing) Set the enableAntiAliasing value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableAntiAliasing` property instead. .. method:: SetEnableCenterLines(self, value) Set the enableCenterLines value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableCenterLines` property instead. .. method:: SetEnableDiagonals(self, value) Set the enableDiagonals value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableDiagonals` property instead. .. method:: SetEnableDrag(self, value) Set the enableDrag value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableDrag` property instead. .. method:: SetEnableGrid(self, value) Set the enableGrid value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableGrid` property instead. .. method:: SetEnableHiRes(self, enableHiRes) Set the enableHiRes value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableHiRes` property instead. .. method:: SetEnableLegend(self, value) Set the enableLegend value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableLegend` property instead. .. method:: SetEnablePointLabel(self, value) Set the enablePointLabel value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enablePointLabel` property instead. .. method:: SetEnableTitle(self, value) Set the enableTitle value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableTitle` property instead. .. method:: SetEnableZoom(self, value) Set the enableZoom value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableZoom` property instead. .. method:: SetFontSizeAxis(self, point=10) Set the tick and axis label font size (default is 10 point) .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.fontSizeAxis` property instead. .. method:: SetFontSizeLegend(self, point=7) Set legend font size (default is 7 point) .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.fontSizeLegend' property instead. .. method:: SetFontSizeTitle(self, point=15) Set Title font size (default is 15 point) .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.fontSizeTitle` property instead. .. method:: setLogScale(self, logscale) Set the log scale boolean value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.logScale` property instead. .. method:: SetPointLabelFunc(self, func) Set the enablePointLabel value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enablePointLabel` property instead. .. method:: SetShowScrollbars(self, value) Set the showScrollbars value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.showScrollbars` property instead. .. method:: SetUseScientificNotation(self, useScientificNotation) Set the useScientificNotation value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.useScientificNotation` property instead. .. method:: SetXSpec(self, spectype='auto') Set the xSpec value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.xSpec` property instead. .. method:: SetYSpec(self, spectype='auto') Set the ySpec value. .. deprecated:: Feb 27, 2016 Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.ySpec` property instead. .. method:: UpdatePointLabel(self, mDataDict) Updates the pointLabel point on screen with data contained in mDataDict. mDataDict will be passed to your function set by SetPointLabelFunc. It can contain anything you want to display on the screen at the scaledXY point you specify. This function can be called from parent window with onClick, onMotion events etc. .. method:: Zoom(self, Center, Ratio) Zoom on the plot Centers on the X,Y coords given in Center Zooms by the Ratio = (Xratio, Yratio) given .. attribute:: absScale The absScale value as a 2-tuple of bools: ``(x_axis_is_abs_scale, y_axis_is_abs_scale)``. :getter: Returns the value of absScale. :setter: Sets the value of absScale. :type: tuple of bools, length 2 :raise: `TypeError` when setting an invalid value. .. attribute:: axesPen The :class:`wx.Pen` used to draw the axes lines on the plot. :getter: Returns the :class:`wx.Pen` used for drawing the axes lines. :setter: Sets the :class:`wx.Pen` use for drawging the axes lines. :type: :class:`wx.Pen` :raise: `TypeError` when setting a value that is not a :class:`wx.Pen`. .. attribute:: centerLinePen The :class:`wx.Pen` used to draw the center lines on the plot. :getter: Returns the :class:`wx.Pen` used for drawing the center lines. :setter: Sets the :class:`wx.Pen` use for drawging the center lines. :type: :class:`wx.Pen` :raise: `TypeError` when setting a value that is not a :class:`wx.Pen`. .. attribute:: diagonalPen The :class:`wx.Pen` used to draw the diagonal lines on the plot. :getter: Returns the :class:`wx.Pen` used for drawing the diagonal lines. :setter: Sets the :class:`wx.Pen` use for drawging the diagonal lines. :type: :class:`wx.Pen` :raise: `TypeError` when setting a value that is not a :class:`wx.Pen`. .. attribute:: enableAntiAliasing The current enableAntiAliasing value. :getter: Returns the value of enableAntiAliasing. :setter: Sets the value of enableAntiAliasing. :type: bool :raises: `TypeError` if setting a non-boolean value. .. attribute:: enableAxes The current enableAxes value. :getter: Returns the value of enableAxes. :setter: Sets the value of enableAxes. :type: bool, 2-tuple of bool, or 4-tuple of bool :raises: `TypeError` if setting an invalid value. :raises: `ValueError` if the tuple has incorrect length. If bool, enable or disable all axis If 2-tuple, enable or disable the bottom or left axes: ``(bottom, left)`` If 4-tuple, enable or disable each axis individually: ``(bottom, left, top, right)`` .. attribute:: enableAxesLabels The current enableAxesLabels value. :getter: Returns the value of enableAxesLabels. :setter: Sets the value of enableAxesLabels. :type: bool :raises: `TypeError` if setting an invalid value. .. attribute:: enableAxesValues The current enableAxesValues value. :getter: Returns the value of enableAxesValues. :setter: Sets the value of enableAxesValues. :type: bool, 2-tuple of bool, or 4-tuple of bool :raises: `TypeError` if setting an invalid value. :raises: `ValueError` if the tuple has incorrect length. If bool, enable or disable all axis values If 2-tuple, enable or disable the bottom or left axes values: ``(bottom, left)`` If 4-tuple, enable or disable each axis value individually: ``(bottom, left, top, right)`` .. attribute:: enableCenterLines The current enableCenterLines value. :getter: Returns the value of enableCenterLines. :setter: Sets the value of enableCenterLines. :type: bool or str :raises: `TypeError` if setting an invalid value. If set to a single boolean value, then both horizontal and vertical lines will be enabled or disabled. If a string, must be one of ``('Horizontal', 'Vertical')``. .. attribute:: enableDiagonals The current enableDiagonals value. :getter: Returns the value of enableDiagonals. :setter: Sets the value of enableDiagonals. :type: bool or str :raises: `TypeError` if setting an invalid value. If set to a single boolean value, then both diagonal lines will be enabled or disabled. If a string, must be one of ``('Bottomleft-Topright', 'Bottomright-Topleft')``. .. attribute:: enableDrag The current enableDrag value. :getter: Returns the value of enableDrag. :setter: Sets the value of enableDrag. :type: bool :raises: `TypeError` if setting a non-boolean value. .. note:: This is mutually exclusive with :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableZoom`. Setting one will disable the other. .. seealso:: :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableZoom` .. attribute:: enableGrid The current enableGrid value. :getter: Returns the value of enableGrid. :setter: Sets the value of enableGrid. :type: bool or 2-tuple of bools :raises: `TypeError` if setting an invalid value. If set to a single boolean value, then both X and y grids will be enabled (``enableGrid = True``) or disabled (``enableGrid = False``). If a 2-tuple of bools, the 1st value is the X (vertical) grid and the 2nd value is the Y (horizontal) grid. .. attribute:: enableHiRes The current enableHiRes value. :getter: Returns the value of enableHiRes. :setter: Sets the value of enableHiRes. :type: bool :raises: `TypeError` if setting a non-boolean value. .. attribute:: enableLegend The current enableLegend value. :getter: Returns the value of enableLegend. :setter: Sets the value of enableLegend. :type: bool :raises: `TypeError` if setting a non-boolean value. .. attribute:: enablePlotTitle The current enablePlotTitle value. :getter: Returns the value of enablePlotTitle. :setter: Sets the value of enablePlotTitle. :type: bool :raises: `TypeError` if setting an invalid value. .. attribute:: enablePointLabel The current enablePointLabel value. :getter: Returns the value of enablePointLabel. :setter: Sets the value of enablePointLabel. :type: bool :raises: `TypeError` if setting a non-boolean value. .. attribute:: enableTicks The current enableTicks value. :getter: Returns the value of enableTicks. :setter: Sets the value of enableTicks. :type: bool, 2-tuple of bool, or 4-tuple of bool :raises: `TypeError` if setting an invalid value. :raises: `ValueError` if the tuple has incorrect length. If bool, enable or disable all ticks If 2-tuple, enable or disable the bottom or left ticks: ``(bottom, left)`` If 4-tuple, enable or disable each tick side individually: ``(bottom, left, top, right)`` .. attribute:: enableTitle The current enableTitle value. :getter: Returns the value of enableTitle. :setter: Sets the value of enableTitle. :type: bool :raises: `TypeError` if setting a non-boolean value. .. attribute:: enableXAxisLabel The current enableXAxisLabel value. :getter: Returns the value of enableXAxisLabel. :setter: Sets the value of enableXAxisLabel. :type: bool :raises: `TypeError` if setting an invalid value. .. attribute:: enableYAxisLabel The current enableYAxisLabel value. :getter: Returns the value of enableYAxisLabel. :setter: Sets the value of enableYAxisLabel. :type: bool :raises: `TypeError` if setting an invalid value. .. attribute:: enableZoom The current enableZoom value. :getter: Returns the value of enableZoom. :setter: Sets the value of enableZoom. :type: bool :raises: `TypeError` if setting a non-boolean value. .. note:: This is mutually exclusive with :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableDrag`. Setting one will disable the other. .. seealso:: :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.enableDrag` .. attribute:: fontSizeAxis The current tick and axis label font size in points. Default is 10pt font. :getter: Returns the value of fontSizeAxis. :setter: Sets the value of fontSizeAxis. :type: int or float .. attribute:: fontSizeLegend The current Legned font size in points. Default is 7pt font. :getter: Returns the value of fontSizeLegend. :setter: Sets the value of fontSizeLegend. :type: int or float .. attribute:: fontSizeTitle The current Title font size in points. Default is 15pt font. :getter: Returns the value of fontSizeTitle. :setter: Sets the value of fontSizeTitle. :type: int or float .. attribute:: gridPen The :class:`wx.Pen` used to draw the grid lines on the plot. :getter: Returns the :class:`wx.Pen` used for drawing the grid lines. :setter: Sets the :class:`wx.Pen` use for drawging the grid lines. :type: :class:`wx.Pen` :raise: `TypeError` when setting a value that is not a :class:`wx.Pen`. .. attribute:: logScale The logScale value as a 2-tuple of bools: ``(x_axis_is_log_scale, y_axis_is_log_scale)``. :getter: Returns the value of logScale. :setter: Sets the value of logScale. :type: tuple of bools, length 2 :raise: `TypeError` when setting an invalid value. .. attribute:: pageSetupData See :meth:`~PlotCanvas.pageSetupData` .. attribute:: pointLabelFunc The current pointLabelFunc value. :getter: Returns the value of pointLabelFunc. :setter: Sets the value of pointLabelFunc. :type: function TODO: More information is needed. Sets the function with custom code for pointLabel drawing .. attribute:: print_data See :meth:`~PlotCanvas.print_data` .. attribute:: showScrollbars The current showScrollbars value. :getter: Returns the value of showScrollbars. :setter: Sets the value of showScrollbars. :type: bool :raises: `TypeError` if setting a non-boolean value. .. attribute:: tickLength The length of the tick marks on an axis. :getter: Returns the length of the tick marks. :setter: Sets the length of the tick marks. :type: tuple of (xlength, ylength): int or float :raise: `TypeError` when setting a value that is not an int or float. .. attribute:: tickLengthPrinterScale See :meth:`~PlotCanvas.tickLengthPrinterScale` .. attribute:: tickPen The :class:`wx.Pen` used to draw the tick marks on the plot. :getter: Returns the :class:`wx.Pen` used for drawing the tick marks. :setter: Sets the :class:`wx.Pen` use for drawging the tick marks. :type: :class:`wx.Pen` :raise: `TypeError` when setting a value that is not a :class:`wx.Pen`. .. attribute:: useScientificNotation The current useScientificNotation value. :getter: Returns the value of useScientificNotation. :setter: Sets the value of useScientificNotation. :type: bool :raises: `TypeError` if setting a non-boolean value. .. attribute:: xCurrentRange The plots' X range of the currently displayed portion as a tuple of ``(min, max)`` :getter: Returns the value of xCurrentRange. .. seealso:: :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.yCurrentRange` .. attribute:: xMaxRange The plots' maximum X range as a tuple of ``(min, max)``. :getter: Returns the value of xMaxRange. .. seealso:: :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.yMaxRange` .. attribute:: xSpec Defines the X axis type. Default is 'auto'. :getter: Returns the value of xSpec. :setter: Sets the value of xSpec. :type: str, int, or length-2 sequence of floats :raises: `TypeError` if setting an invalid value. Valid strings: + 'none' - shows no axis or tick mark values + 'min' - shows min bounding box values + 'auto' - rounds axis range to sensible values Other valid values: + - like 'min', but with tick marks + list or tuple: a list of (min, max) values. Must be length 2. .. seealso:: :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.ySpec` .. attribute:: yCurrentRange The plots' Y range of the currently displayed portion as a tuple of ``(min, max)`` :getter: Returns the value of yCurrentRange. .. seealso:: :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.xCurrentRange` .. attribute:: yMaxRange The plots' maximum Y range as a tuple of ``(min, max)``. :getter: Returns the value of yMaxRange. .. seealso:: :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.xMaxRange` .. attribute:: ySpec Defines the Y axis type. Default is 'auto'. :getter: Returns the value of xSpec. :setter: Sets the value of xSpec. :type: str, int, or length-2 sequence of floats :raises: `TypeError` if setting an invalid value. Valid strings: + 'none' - shows no axis or tick mark values + 'min' - shows min bounding box values + 'auto' - rounds axis range to sensible values Other valid values: + - like 'min', but with tick marks + list or tuple: a list of (min, max) values. Must be length 2. .. seealso:: :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.xSpec`