Changeset 573 for trunk/UTIL


Ignore:
Timestamp:
Mar 7, 2012, 8:51:08 PM (13 years ago)
Author:
aslmd
Message:

UTIL PYTHON: added save capabilities for figures in sparse.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/sparse.py

    r572 r573  
    1919   from scipy.io.idl import readsav
    2020   import numpy as np
    21    from myplot import separatenames, definesubplot, errormess, defcolorb, fmtvar, polarinterv, simplinterv, define_proj, readdata
     21   from myplot import separatenames, definesubplot, errormess, defcolorb, fmtvar, polarinterv, simplinterv, define_proj, readdata, makeplotres
    2222   from mymath import min, max, writeascii
    2323   import matplotlib as mpl
     
    291291          title('all point selected')
    292292       
    293 
    294 
    295    
    296    show()
     293   zeplot = "output"
     294   if opt.save in ['png','eps','svg','pdf']:     makeplotres(zeplot,ext=opt.save)#,res=resolution,pad_inches_value=pad_inches_value,disp=False,ext=save)
     295   elif opt.save == 'gui':                       show()
     296   else:                                         print "INFO: save mode not supported. using gui instead." ; show()
    297297   print ''
    298298
    299    
    300 
    301 
    302    
     299   command = ""
     300   for arg in sys.argv: command = command + arg + ' '
     301   name = zeplot
     302   f = open(name+'.sh', 'w')
     303   f.write(command)
     304
     305   
     306
     307
     308   
Note: See TracChangeset for help on using the changeset viewer.