Bobby R. Bruce has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/47019 )

Change subject: util,python: Add escape chars to lowp_dram_sweep_ploy.py
......................................................................

util,python: Add escape chars to lowp_dram_sweep_ploy.py

Change-Id: I783ddfe0c4c04223527a93af9f367f00544cd300
---
M util/plot_dram/lowp_dram_sweep_plot.py
1 file changed, 11 insertions(+), 11 deletions(-)



diff --git a/util/plot_dram/lowp_dram_sweep_plot.py b/util/plot_dram/lowp_dram_sweep_plot.py
index 57bed04..299d8cd 100755
--- a/util/plot_dram/lowp_dram_sweep_plot.py
+++ b/util/plot_dram/lowp_dram_sweep_plot.py
@@ -85,7 +85,7 @@
         outfile = open(texfile_s, 'w')

         startDocText(outfile)
-        outfile.write("\\begin{figure} \n\centering\n")
+        outfile.write("\\begin{figure} \n\\centering\n")
         ## Time plots for all delay values
         for delay in delays:
             # Time
@@ -95,13 +95,13 @@
         outfile.write("\end{figure}\n")

         # Energy plots for all delay values
-        outfile.write("\\begin{figure} \n\centering\n")
+        outfile.write("\\begin{figure} \n\\centering\n")
         for delay in delays:
             # Energy
             filename = plotter.stateEnergyPlotName(str(delay) + '-')
             outfile.write(wrapForGraphic(filename, textwidth))
             outfile.write(getCaption(delay))
-        outfile.write("\end{figure}\n")
+        outfile.write("\\end{figure}\n")

         endDocText(outfile)
         outfile.close()
@@ -115,31 +115,31 @@


 def getCaption(delay):
-    return ('\caption{' +
+    return ('\\caption{' +
             'itt delay = ' + str(delay) +
             '}\n')

 def wrapForGraphic(filename, width='1.0'):
     # \t is tab and needs to be escaped, therefore \\textwidth
-    return '\includegraphics[width=' + width + \
+    return '\\includegraphics[width=' + width + \
         '\\textwidth]{' + filename + '}\n'

 def startDocText(outfile):

-    start_stuff = '''
-\documentclass[a4paper,landscape,twocolumn]{article}
+    start_stuff = """
+\\documentclass[a4paper,landscape,twocolumn]{article}

-\usepackage{graphicx}
-\usepackage[margin=0.5cm]{geometry}
+\\usepackage{graphicx}
+\\usepackage[margin=0.5cm]{geometry}
 \\begin{document}
-'''
+"""
     outfile.write(start_stuff)

 def endDocText(outfile):

     end_stuff = '''

-\end{document}
+\\end{document}

 '''
     outfile.write(end_stuff)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47019
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I783ddfe0c4c04223527a93af9f367f00544cd300
Gerrit-Change-Number: 47019
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to