Changeset 25836 for issm/trunk/src/m/plot/applyoptions.py
- Timestamp:
- 12/08/20 08:45:53 (4 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/m/plot/applyoptions.py
r24686 r25836 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 pyplot, 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.