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 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291
|
.. 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
<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>PlotCanvas</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.plotcanvas.PlotCanvas_inheritance.png" alt="Inheritance diagram of PlotCanvas" 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.plotcanvas.PlotCanvas.html" title="wx.lib.plot.plotcanvas.PlotCanvas" alt="" coords="5,392,248,421"/> <area shape="rect" id="node2" href="wx.Panel.html" title="wx.Panel" alt="" coords="87,315,167,344"/> <area shape="rect" id="node3" href="wx.Window.html" title="wx.Window" alt="" coords="78,237,175,267"/> <area shape="rect" id="node4" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="62,160,191,189"/> <area shape="rect" id="node5" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="68,83,185,112"/> <area shape="rect" id="node6" href="wx.Object.html" title="wx.Object" alt="" coords="23,5,110,35"/> <area shape="rect" id="node7" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="135,5,241,35"/> </map>
</p>
</div>
|
|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:
+ <number> - like 'min', but with <number> 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:
+ <number> - like 'min', but with <number> tick marks
+ list or tuple: a list of (min, max) values. Must be length 2.
.. seealso::
:attr:`~wx.lib.plot.plotcanvas.PlotCanvas.xSpec`
|