Commit Graph

38 Commits

Author SHA1 Message Date
Per A. Brodtkorb
033c18fd9f Fixes issue #1556
Replaced XXX.keys() calls with idiomatic python 3 calls that are compatible with python 2 such as eg:
 * replaced "y = xxx.keys()" or "y = list(xxx.keys())" with just "y = list(xxx)"
 * replaced "sorted(xxx.keys())" or "sorted(list(xxx.keys()))" with just "sorted(xxx)"
 * replaced "if not A in B.keys():" with "if A not in B:"
 * replaced "for A in B.keys():"  with "for A in B:"

See also https://python-future.org/compatible_idioms.html
https://python-future.org/compatible_idioms.html#dict-keys-values-items-as-a-list
2020-03-20 18:51:19 +01:00
Robin Dunn
171df70a43 Fix SyntaxWarnings 2019-11-14 12:22:45 -08:00
Robin Dunn
8f5bfd6484 Add option to the plot demo for toggling the scrollbars 2019-11-13 12:00:52 -08:00
Robin Dunn
5b91b8443e Decouple showScrollbars property from the actual showing/hiding of the scrollbar widgets. Instead it indicates whether the scrollbars are allowed to be shown if _adjustScrollbars() determines that they are needed.
Also fix issues with calculating scrolled view positions when scrolling with the scrollbars.
2019-11-13 12:00:32 -08:00
Robin Dunn
9740c8e455 Use stock IDs for stock menu items 2019-11-12 11:45:42 -08:00
Robin Dunn
9723f49ec0 Merge pull request #911 from RobinD42/fix-issue902
Switch deprecation warnings in wx.lib.plot
(cherry picked from commit eac1404fcc)
2018-07-04 00:49:07 -07:00
Metallicow
c76384d458 Trim trailing whitespace *.py files 2018-01-16 08:47:07 -06:00
Robin Dunn
d86795d884 Don't use the string module. Do use the new file dialog style flags. 2017-09-12 15:38:49 -07:00
Robin Dunn
e43ba1eec0 Suggest using pip to install numpy 2017-09-08 14:18:53 -07:00
Robin Dunn
989e15a1dd Set an initial frame size 2017-09-08 14:11:02 -07:00
Robin Dunn
77de0cfb7d Merge branch 'refactor-lib.plot-part3' of https://github.com/dougthor42/Phoenix into dougthor42-refactor-lib.plot-part3 2017-09-08 09:20:11 -07:00
Robin Dunn
81f8c41a24 Fix missing imports needed for drawing the legend 2017-09-06 16:54:03 -07:00
Robin Dunn
fc10486740 Ensure there are at least 3 points in the list for DrawSpline 2017-06-30 13:22:31 -07:00
Andrew Murray
2cfe4ad989 Fixed typos 2017-02-26 14:15:49 +11:00
Douglas Thor
d97731ed67 Added bottom-left and all to demo enableTicks 2016-11-28 16:59:18 -08:00
Douglas Thor
845d7b6ba2 Fixed display of negative-length ticks
+ Changed default ticks to negative (extent out of plot rather an into plot).
+ Fixed tickLength setter - was setting unused self._tickWitch value
+ Added tickLengthPrinterScale property
+ axis values and labels should no longer overlap if tick lengths are negative.
2016-11-28 16:37:15 -08:00
Douglas Thor
0f90e02dcd Refactor if in _Draw(); use parens not \
+ Fixed typo in top-side ticks.
2016-11-28 16:37:12 -08:00
Douglas Thor
600cfb4d6c Miscellaneous cleanup, moved pairwise to utils.py 2016-11-28 14:53:35 -08:00
Douglas Thor
8832bb7880 Documentation fixes.
+ added deprecation note to docstring of PolyPoint.setLogScale
+ Replaced PendingDeprecation decorator with function.
  + This fixes the documentation having `wrapper(*args, **kwargs)`
+ Fixed some minor errors due to package conversion
+ Updated sphinx x-refs to reflect new package structure.
2016-11-28 14:40:59 -08:00
Douglas Thor
98edefdf8c Fixed bug with PlotPrintout in plotcanvas.py 2016-11-28 14:40:59 -08:00
Douglas Thor
d69fb78654 Updated docs for utils.py 2016-11-28 14:40:58 -08:00
Robin Dunn
ce00fc06a5 * Slight refactoring in wx/lib/plot/examples/demo.py
* Add a __init__.py
* Update the PyPlot sample in the main wxPython demo to use the new plot demo
2016-08-10 10:48:54 -07:00
Robin Dunn
67242fb6b4 Add a message dlg explaining how to see the demo samples. 2016-07-16 08:59:38 -07:00
Robin Dunn
128b28c879 Building the docs (build.py wxlib) imports all modules, so we need to avoid import side-effects like starting an application. 2016-07-16 08:58:52 -07:00
Douglas Thor
29d42604ab docstring updates. 2016-07-07 09:13:21 -07:00
Douglas Thor
3817c4e5e7 Updates to demo.py
+ renamed _test() to run_demo().
+ Renamed TestFrame to MainFrame, moved methods into logical blocks.
2016-07-07 09:13:21 -07:00
Douglas Thor
15a8b2d13b Documentation updates
+ Sphinx cross-references and pylint: disable
+ Added __docformat__ and import comments
2016-07-07 09:13:20 -07:00
Douglas Thor
81244b6a7e Renamed plot.py to polyobjects.py
+ Moved DisplaySide, scale_and_shift_point, and set_displayside to utils.py
  + renamed _DisplaySide to DisplaySide
  + renamed _set_displayside to set_displayside
+ updated imports to reflect package rename
+ changed format of imports in __init__.py to be more PEP8-like.
+ updated numpy import exception
+ whitespace cleanups.
2016-07-07 09:13:20 -07:00
Douglas Thor
047da1b885 Class and function renaming.
+ Renamed demo.__test() to demo._test()
  + Updated __main__ to reflect this change.
+ Renamed BoxPlot to PolyBoxPlot to maintain uniformity
  + Added backwards compat for PolyBoxPlot to __init__.py
+ Updated CHANGELOG.md
2016-07-07 09:13:20 -07:00
Douglas Thor
7da7a52737 Added __main__.py so python -m plot runs demo 2016-07-07 09:13:20 -07:00
Douglas Thor
c34cc76cd6 Moved demos to ./examples 2016-07-07 09:13:20 -07:00
Douglas Thor
a8be4a9e1e Moved PlotCanvas to its own module: plotcanvas.py 2016-07-07 09:13:19 -07:00
Douglas Thor
c601ec9989 Added simple_example.py
+ fixed typo in __init__.py
+ Added x values to box plot legends in demo.py
2016-07-07 09:13:19 -07:00
Douglas Thor
31c35d0cfc Moved TempStyle, PendingDeprecation to utils.py 2016-07-07 09:13:19 -07:00
Douglas Thor
b6e5d73b42 Moved demo to separate module, replaced cursors for mag and move. 2016-07-07 09:13:19 -07:00
Douglas Thor
91c85b24a9 Updated __init__.py
+ old imports are not affected by the new package structure.
2016-07-07 09:13:18 -07:00
Douglas Thor
e80aa821bb Moved plot.py to plot/plot.py 2016-07-07 09:13:18 -07:00
Douglas Thor
2fd98b724b Moved changelog and readme to files. 2016-07-07 09:13:18 -07:00