Changeset 23677 for issm/trunk-jpl/src/py3/plot/checkplotoptions.py
- Timestamp:
- 02/01/19 03:29:03 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/py3/plot/checkplotoptions.py
r23670 r23677 29 29 if 'on' in options.getfieldvalue('showsection','on'): 30 30 options.changefieldvalue('showsection',4) 31 # }}} 31 # }}} 32 32 # {{{ smooth values 33 33 if options.exist('smooth'): … … 54 54 textlist.extend([text] if isinstance(text,str) else text) 55 55 numtext=len(textlist) 56 # text position 56 # text position 57 57 textpos=options.getfieldvalue('textposition',[0.5,0.5]) 58 58 if not isinstance(textpos,list): 59 59 raise Exception('textposition should be passed as a list') 60 60 if any(isinstance(i,list) for i in textpos): 61 62 63 64 65 61 textx=[item[0] for item in textpos] 62 texty=[item[1] for item in textpos] 63 else: 64 textx=[textpos[0]] 65 texty=[textpos[1]] 66 66 if len(textx)!=numtext or len(texty)!=numtext: 67 67 raise Exception('textposition should contain one list of x,y vertices for every text instance')
Note:
See TracChangeset
for help on using the changeset viewer.