Skip to content

Commit

Permalink
updated an import for newer MPL. now there are wx compatibility issue…
Browse files Browse the repository at this point in the history
…s to be resolved.
  • Loading branch information
ChrisBarker-NOAA committed Feb 25, 2016
1 parent 287992c commit 51e0150
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include README.rst LICENSE.txt ChangeLog MANIFEST.in MANIFEST metasetup.py
include README.rst LICENSE.txt ChangeLog MANIFEST.in
include plotit
recursive-include demos *.py
recursive-include reference *.html *.txt *.css *.js *.png
2 changes: 1 addition & 1 deletion demos/picking_points.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env pythonw

# Name: WxMplPoints.py
# Purpose: Demonstrates point picking in WxMpl
Expand Down
2 changes: 1 addition & 1 deletion demos/plotting.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env pythonw
# Purpose: Demonstrates different plots from the matplotlib examples collection
# Author: Ken McIvor <[email protected]>, deriving from the matplotlib examples
# collection
Expand Down
2 changes: 1 addition & 1 deletion demos/stripcharting.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env pythonw
# Purpose: Demonstrates stripcharting using wxmpl
# Author: Ken McIvor <[email protected]>
#
Expand Down
18 changes: 10 additions & 8 deletions plotit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env pythonw

# Name: plotit
# Purpose: Experiment data visualization
Expand Down Expand Up @@ -175,16 +175,18 @@ This program requires matplotlib, Python's 2D plotting library.

try:
import wxmpl
except ImportError:
if __name__ == '__main__':
except ImportError as err:
if __name__ == '__main__' and "wxmpl" in err.message:
sys.stderr.write('''\
This program requires WxMpl, a library for embedding matplotlib in wxPython
applications.
This program requires WxMpl, a library for embedding matplotlib in wxPython
applications.

WxMpl can be downloaded from http://agni.phys.iit.edu/~kmcivor/wxmp/
''')
WxMpl can be downloaded from https://github.com/NOAA-ORR-ERD/wxmpl
''')
sys.exit(1)

else:
raise

try:
import xdp.io # if it's available, use XDP to load data
except ImportError:
Expand Down
2 changes: 1 addition & 1 deletion wxmpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import matplotlib
matplotlib.use('WXAgg')
import numpy as NumPy
from matplotlib.axes import _process_plot_var_args
from matplotlib.axes._base import _process_plot_var_args
from matplotlib.backend_bases import FigureCanvasBase
from matplotlib.backends.backend_agg import FigureCanvasAgg, RendererAgg
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg
Expand Down

0 comments on commit 51e0150

Please sign in to comment.