def addSlideTextPlotPlot(slideTitle,bullets,plotName1,plotName2,drawType="includegraphics",opts=""): code = "\\begin{frame}\\frametitle{%s} \n" % (slideTitle) code += utils.bulletsToCode(bullets) code += "\\begin{center}" code += "\\%s[height=%.2f\\textheight,width=0.48\\textwidth,keepaspectratio]{%s} \n" \ % (drawType, utils.textLinesToPlotHeight(utils.bulletNLines(bullets)),plotName1) code += "\\%s[height=%.2f\\textheight,width=0.48\\textwidth,keepaspectratio]{%s} \n" \ % (drawType, utils.textLinesToPlotHeight(utils.bulletNLines(bullets)),plotName2) code += "\\end{center}" return code
def addSlideTextPlotPlotPlot(slideTitle, bullets, plotName1, plotName2, plotName3, drawType="includegraphics", opts=""): opts = utils.parseOptions(opts) code = "\\begin{frame}\\frametitle{%s} \n" % (slideTitle) code += utils.handleStartingOpts(opts) height = 0.5 * utils.textLinesToPlotHeight(utils.bulletNLines(bullets)) width = 1.0 code += utils.bulletsToCode(bullets, opts) code += "\\begin{columns}[c]\n" code += "\\column{0.5\\textwidth}\n" code += "\\centering" code += "\\%s[height=%.2f\\textheight,width=%.2f\\textwidth,keepaspectratio]{%s}\\\\ \n" % ( drawType, height, width, plotName1) code += "\\%s[height=%.2f\\textheight,width=%.2f\\textwidth,keepaspectratio]{%s} \n" % ( drawType, height, width, plotName2) code += "\\column{0.55\\textwidth}\n" code += "\\centering" code += "\\hspace*{-0.10\\textwidth}\\%s[height=%.2f\\textheight,width=%.2f\\textwidth,keepaspectratio]{%s} \n" % ( drawType, 1.5 * height, width, plotName3) code += "\\end{columns}" return code
def addSlideTextPlots(slideTitle, bullets, plots=[], drawType="includegraphics", opts=""): opts = utils.parseOptions(opts) code = "\\begin{frame}\\frametitle{%s} \n" % (slideTitle) code += utils.handleStartingOpts(opts) nRows = int(opts["numrows"]) if opts["numrows"] else 2 plotChunks = [plots[i:i + nRows] for i in range(0, len(plots), nRows)] nCols = len(plotChunks) height = (1.0 / nRows) * utils.textLinesToPlotHeight( utils.bulletNLines(bullets)) width = 1.0 code += utils.bulletsToCode(bullets, opts) code += "\\begin{columns}[t]\n" for chunk in plotChunks: code += "\\column{%.2f\\textwidth}\n" % (1.0 / nCols) code += "\\centering" for plot in chunk: code += "\\%s[height=%.2f\\textheight,width=%.2f\\textwidth,keepaspectratio]{%s}\\\\ \n" % ( drawType, height, width, plot) code += "\\end{columns}" return code
def addSlideTextPlotPlot(slideTitle, bullets, plotName1, plotName2, drawType="includegraphics", opts=""): opts = utils.parseOptions(opts) code = "\\begin{frame}\\frametitle{%s} \n" % (slideTitle) code += utils.handleStartingOpts(opts) if (opts["plottop"]): code += "\\begin{center}" code += "\\%s[height=%.2f\\textheight,width=0.48\\textwidth,keepaspectratio]{%s} \n" \ % (drawType, utils.textLinesToPlotHeight(utils.bulletNLines(bullets)),plotName1) code += "\\%s[height=%.2f\\textheight,width=0.48\\textwidth,keepaspectratio]{%s} \n" \ % (drawType, utils.textLinesToPlotHeight(utils.bulletNLines(bullets)),plotName2) code += "\\end{center}" code += utils.bulletsToCode(bullets, opts) elif (opts["plotsleft"]): height = 0.45 width = 0.55 code += "\\begin{columns}\n" code += "\\column{%.2f\\textwidth}\n" % width code += "\\centering" code += "\\%s[height=%.2f\\textheight,width=%.2f\\textwidth,keepaspectratio]{%s}\\\\ \n" % ( drawType, height, 1.0, plotName1) code += "\\%s[height=%.2f\\textheight,width=%.2f\\textwidth,keepaspectratio]{%s} \n" % ( drawType, height, 1.0, plotName2) code += "\\column{%.2f\\textwidth}\n" % (1.0 - width) code += "\\centering" code += utils.bulletsToCode(bullets, opts) code += "\\end{columns}" else: code += utils.bulletsToCode(bullets, opts) code += "\\begin{center}" code += "\\%s[height=%.2f\\textheight,width=0.48\\textwidth,keepaspectratio]{%s} \n" \ % (drawType, utils.textLinesToPlotHeight(utils.bulletNLines(bullets)),plotName1) code += "\\%s[height=%.2f\\textheight,width=0.48\\textwidth,keepaspectratio]{%s} \n" \ % (drawType, utils.textLinesToPlotHeight(utils.bulletNLines(bullets)),plotName2) code += "\\end{center}" return code
def addSlideTextPlot(slideTitle, bullets, plotName, drawType="includegraphics", opts=""): opts = utils.parseOptions(opts) code = "\\begin{frame}\\frametitle{%s} \n" % (slideTitle) code += utils.handleStartingOpts(opts) if (opts["sidebyside"]): code += "\\begin{columns}\n \\begin{column}{0.5\\textwidth} \n" code += utils.bulletsToCode(bullets, opts) code += "\\end{column}\n \\begin{column}{0.5\\textwidth}" code += " \\begin{center}" code += " \\%s[width=\\textwidth,keepaspectratio]{%s} \n" % ( drawType, plotName) code += " \\end{center}\n \\end{column}\n\\end{columns} \n" elif (opts["plottop"]): code += "\\begin{center}" code += " \\%s[height=%.2f\\textheight,keepaspectratio]{%s} \n" \ % (drawType, utils.textLinesToPlotHeight(utils.bulletNLines(bullets)),plotName) code += "\\end{center}\n" code += utils.bulletsToCode(bullets, opts) else: code += utils.bulletsToCode(bullets, opts) code += "\\begin{center}" if (opts["fithorizontal"]): code += " \\vspace*{%.2f\\textheight}\\%s[width=0.99\\textwidth,keepaspectratio]{%s} \n" \ % (0.9-utils.textLinesToPlotHeight(utils.bulletNLines(bullets)),drawType,plotName) else: code += " \\%s[height=%.2f\\textheight,keepaspectratio]{%s} \n" \ % (drawType, utils.textLinesToPlotHeight(utils.bulletNLines(bullets)),plotName) code += "\\end{center}\n" return code
def addSlideTextPlot(slideTitle,bullets,plotName,drawType="includegraphics",opts=""): opts = utils.parseOptions(opts) code = "\\begin{frame}\\frametitle{%s} \n" % (slideTitle) if(opts["sidebyside"]): code += "\\begin{columns}\n \\begin{column}{0.5\\textwidth} \n" code += utils.bulletsToCode(bullets) code += "\\end{column}\n \\begin{column}{0.5\\textwidth}" code += " \\begin{center}" code += " \\%s[width=\\textwidth,keepaspectratio]{%s} \n" % (drawType, plotName) code += " \\end{center}\n \\end{column}\n\\end{columns} \n" else: code += utils.bulletsToCode(bullets) code += "\\begin{center}" code += " \\%s[height=%.2f\\textheight,keepaspectratio]{%s} \n" \ % (drawType, utils.textLinesToPlotHeight(utils.bulletNLines(bullets)),plotName) code += "\\end{center}\n" return code