Changeset 25065 for issm/trunk-jpl/src/m/plot/applyoptions.py
- Timestamp:
- 06/18/20 16:01:39 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk-jpl/src/m/plot/applyoptions.py ¶
r24565 r25065 1 from cmaptools import getcolormap 2 try: 3 import matplotlib as mpl 4 import matplotlib.pyplot as plt 5 from matplotlib.ticker import MaxNLocator 6 except ImportError: 7 print("could not import pylab, matplotlib has not been installed, no plotting capabilities enabled") 1 8 import numpy as np 2 from cmaptools import getcolormap 9 10 from expdisp import expdisp 3 11 from plot_contour import plot_contour 4 12 from plot_streamlines import plot_streamlines 5 from expdisp import expdisp6 7 try:8 from matplotlib.ticker import MaxNLocator9 import matplotlib as mpl10 import matplotlib.pyplot as plt11 except ImportError:12 print("could not import pylab, matplotlib has not been installed, no plotting capabilities enabled")13 13 14 14 … … 20 20 render the data. This object is used for adding a colorbar. 21 21 22 23 24 25 22 Usage: 23 applyoptions(md, data, options) 24 25 See also: PLOTMODEL, PARSE_OPTIONS 26 26 ''' 27 27 … … 34 34 fontweight = options.getfieldvalue('fontweight', 'normal') 35 35 fontfamily = options.getfieldvalue('fontfamily', 'sans - serif') 36 font = {'fontsize': fontsize, 37 'fontweight': fontweight, 38 'family': fontfamily} 36 font = { 37 'fontsize': fontsize, 38 'fontweight': fontweight, 39 'family': fontfamily 40 } 39 41 # }}} 40 42 # {{{ title
Note:
See TracChangeset
for help on using the changeset viewer.