Ignore:
Timestamp:
May 4, 2006, 4:23:04 PM (19 years ago)
Author:
sexton
Message:

update sww2timeseries - png output for latex and use pdflatex instead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/util.py

    r2795 r2799  
    558558    title_on        - if True, export standard graphics
    559559                    - if False, export graphics as eps and generate
    560                       latex output
     560                      latex output (how about png which is much smaller
     561                      and can still latex using pdflatex?)
    561562                    - latex output to be written to same directory as
    562563                      where this function is being used from and named
     
    739740       
    740741    if title_on == False:
    741         ext = '.eps'
     742        #ext = '.eps'
     743        ext = ''
    742744        texfilename = 'latex_output_%s.tex' %(label_id.replace(sep,'_'))
    743745        if verbose: print '\n Latex output printed to %s \n' %texfilename
     
    844846
    845847            gaugeloc1 = gaugeloc.replace(' ','_')
    846             graphname = '%splot_test_%s_%s%s' %(file_loc, which_quantity, gaugeloc1, ext)
     848            graphname = '%sgauge_%s_%s%s' %(file_loc, gaugeloc1, which_quantity, ext)
    847849            latex_file_loc = file_loc.replace(sep,altsep)
    848             graphname_latex = '%splot_test_%s_%s%s' %(latex_file_loc, which_quantity, gaugeloc1, ext)
     850            graphname_latex = '%sgauge_%s_%s_report%s' %(latex_file_loc, gaugeloc1, which_quantity, ext)
    849851
    850852            if title_on == True:
    851853                title('%s scenario: %s at %s gauge'
    852854                      %(label_id, which_quantity, gaugeloc))
     855                savefig(graphname)
    853856            else:
    854857                label = '%s_%s_gauge_%s' %(label_id.replace(sep,'_'), which_quantity, gaugeloc1)
     
    858861                s = '\\caption{%s} \n \label{fig:%s} \n \end{figure} \n \n' %(caption, label)
    859862                fid.write(s)
    860 
    861             savefig(graphname)
    862        
     863                savefig(graphname_latex)
     864           
    863865        thisfile = file_loc+sep+'gauges_time_series'+'_'+gaugeloc+'.csv'
    864866        fid_out = open(thisfile, 'w')
Note: See TracChangeset for help on using the changeset viewer.