Bobby R. Bruce has submitted this change. ( 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
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47019
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M util/plot_dram/lowp_dram_sweep_plot.py
1 file changed, 11 insertions(+), 11 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



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)



1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
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: 3
Gerrit-Owner: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Bobby R. Bruce <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
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