- Timestamp:
- Nov 11, 2016, 10:25:29 PM (8 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/generic.py
r1222 r1326 15 15 import generic_tools as gen 16 16 17 main = 'generic _tools.py'17 main = 'generic.py' 18 18 errormsg = 'ERROR -- error -- ERROR -- error' 19 19 warnmsg = 'WARNING -- warning --WARNING -- warning' … … 50 50 operations=['coincident_CFtimes', 'count_cond', 'datetimeStr_conversion', \ 51 51 'grid_combinations', \ 52 'interpolate_locs', 'l ist_operations', 'PolyArea',\52 'interpolate_locs', 'latex_fig_array', 'list_operations', 'PolyArea', \ 53 53 'radial_points', 'radius_dist', \ 54 54 'rmNOnum', 'running_mean', \ … … 172 172 print gen.grid_combinations(np.int(vals[0]), np.int(vals[1])) 173 173 174 elif oper == 'latex_fig_array': 175 vals = opts.values.split(cS) 176 if vals[0] == 'h': 177 print gen.latex_fig_array.__doc__ 178 print " NOTE: first argument as existing LaTeX file" 179 print " figs: passing list of figures as '@' separated list" 180 print " caption: using '!' for spaces" 181 quit(-1) 182 else: 183 expectargs = '[latexfile],[figs],[figcaption],[figlabel],[dist],[refsize],'+ \ 184 '[width],[height],[dorest]' 185 gen.check_arguments(oper,opts.values,expectargs,cS) 186 187 objf = open(vals[0], 'a') 188 189 figs = vals[1].split('@') 190 caption = vals[2].replace('!',' ') 191 gen.latex_fig_array(figs, objf, caption, vals[3], dist=vals[4], \ 192 refsize=vals[5], width=vals[6], height=vals[7], dorest=vals[8]) 193 objf.write('\\end{document}\n') 194 objf.close() 195 174 196 elif oper == 'interpolate_locs': 175 197 Nvals = 3 -
trunk/tools/generic_tools.py
r1324 r1326 10320 10320 'center': center the figures 10321 10321 >>> latex_fig_array(['figs/figA.png','figs/figB.png','figs/figC.png','figs/figD.png','figs/figE.png'], \ 10322 10322 objf, 'figure test', 'fig:test', dist='2x3', width='None', height='auto', dorest='center') 10323 10323 \begin{figure} 10324 10324 \begin{center}
Note: See TracChangeset
for help on using the changeset viewer.