Changeset 17954


Ignore:
Timestamp:
05/06/14 18:00:01 (11 years ago)
Author:
cborstad
Message:

CHG: added a try/except for importing osgeo/gdal since basic python plots can work without it (only impacts overlay plots

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/plot_manager.py

    r17880 r17954  
    1111from plot_unit import plot_unit
    1212from applyoptions import applyoptions
    13 from plot_overlay import plot_overlay
     13
     14try:
     15        from osgeo import gdal
     16        overlaysupport=True
     17except ImportError:
     18        print 'osgeo/gdal for python not installed, overlay plots are not enabled'
     19        overlaysupport=False
     20
     21if overlaysupport:
     22        from plot_overlay import plot_overlay
    1423
    1524def plot_manager(md,options,fig,ax):
     
    4554
    4655        #overlay plot
    47         if options.exist('overlay'):
     56        if options.exist('overlay') and overlaysupport:
    4857                plot_overlay(md,data,options,ax)
    4958                options.addfielddefault('alpha',0.5)
Note: See TracChangeset for help on using the changeset viewer.