Changeset 3314


Ignore:
Timestamp:
Mar 12, 2018 12:06:39 PM (4 years ago)
Author:
toby
Message:

Use standard names as options for mpl backend tools

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r3313 r3314  
    145145import matplotlib.colors as mpcls
    146146from matplotlib.backends.backend_wx import _load_bitmap
    147 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas
    148 from matplotlib.backends.backend_wxagg import NavigationToolbar2Wx as Toolbar
    149 from matplotlib.backends.backend_agg import FigureCanvasAgg as hcCanvas
     147try:
     148    from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas
     149except ImportError:
     150    from matplotlib.backends.backend_wx import FigureCanvas as Canvas
     151try:
     152    from matplotlib.backends.backend_wxagg import NavigationToolbar2Wx as Toolbar
     153except ImportError:
     154    from matplotlib.backends.backend_wxagg import Toolbar as Toolbar # name changes in wx4.0.1
     155try:
     156    from matplotlib.backends.backend_agg import FigureCanvasAgg as hcCanvas
     157except ImportError:
     158    from matplotlib.backends.backend_agg import FigureCanvas as hcCanvas # standard name
    150159
    151160# useful degree trig functions
Note: See TracChangeset for help on using the changeset viewer.