Changeset 2918


Ignore:
Timestamp:
May 18, 2006, 5:25:09 PM (19 years ago)
Author:
sexton
Message:

updating script to add clearpage into report generation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inundation/pyvolution/util.py

    r2912 r2918  
    762762            east = gauges1[0]
    763763            north = gauges1[1]
    764             s = '%s & %.2f & %.2f \\\\ \hline \n' %(name, east, north)
     764            s = '%s & %.2f & %.2f \\\\ \hline \n' %(name.replace('_',' '), east, north)
    765765            fid.write(s)
    766766
     
    769769    else:
    770770        texfile = ''
    771    
     771
     772    c = 0
    772773    ##### loop over each gauge #####
    773774    for k, g in enumerate(gauges):
     
    856857
    857858            gaugeloc1 = gaugeloc.replace(' ','')
    858             graphname = '%sgauge%s_%s' %(file_loc, gaugeloc1, which_quantity)
     859            gaugeloc2 = gaugeloc1.replace('_','')
     860            graphname = '%sgauge%s_%s' %(file_loc, gaugeloc2, which_quantity)
    859861
    860862            if report == True:
     
    866868
    867869                # storing files in production directory
    868                 graphname_latex = '%sgauge%s%s%s' %(latex_file_loc, gaugeloc1, which_quantity, label_id2)
     870                graphname_latex = '%sgauge%s%s%s' %(latex_file_loc, gaugeloc2, which_quantity, label_id2)
    869871                # giving location in latex output file
    870                 graphname_report = '%sgauge%s%s%s' %('report_figures'+altsep, gaugeloc1, which_quantity, label_id2)
     872                graphname_report = '%sgauge%s%s%s' %('report_figures'+altsep, gaugeloc2, which_quantity, label_id2)
    871873                       
    872                 label = '%s%sgauge%s' %(label_id2, which_quantity, gaugeloc1)
    873                 caption = 'Time series for %s at %s gauge location' %(which_quantity, gaugeloc)
     874                label = '%s%sgauge%s' %(label_id2, which_quantity, gaugeloc2)
     875                caption = 'Time series for %s at %s gauge location' %(which_quantity, gaugeloc.replace('_',' '))
    874876                s = '\\begin{figure}[hbt] \n \\centerline{\includegraphics[width=100mm, height=75mm]{%s%s}} \n' %(graphname_report, '.png')
    875877                fid.write(s)
    876878                s = '\\caption{%s} \n \label{fig:%s} \n \end{figure} \n \n' %(caption, label)
    877879                fid.write(s)
     880                c += 1
     881                if c % 10 == 0: fid.write('\\clearpage \n')
    878882                savefig(graphname_latex) # save figures in production directory for report generation
    879883           
Note: See TracChangeset for help on using the changeset viewer.