def main(): output_graph = sys.argv[1] plot = Plot() plot.hasLegend(location='lower right') plot.xLabel = 'Per-client throughput (Mbps)' # Change this plot.yLabel = 'CDF' plot.xLimits = (0, 50) plot.yLimits = (0, 1) plot.legendLabelSize = FONT_SIZE plot.xTickLabelSize = FONT_SIZE - 2 plot.yTickLabelSize = FONT_SIZE - 2 plot.axesLabelSize = FONT_SIZE for csv_file in sys.argv[2:]: cdf_table = _make_cdf(csv_file) line = Line() line.xValues = [x for (x, _) in cdf_table] line.yValues = [y for (_, y) in cdf_table] line.color = colors.pop(0) line.lineStyle = line_styles.pop(0) # Extract the filename line.label = capitalize( csv_file.split('/')[-2].replace('.csv', '') ) plot.add(line) plot.save(output_graph)
def constructImage(self): line = Line() line.xValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] line.yValues = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100] plot = Plot() plot.useLatexLabels() plot.xLabel = r"$x$" plot.yLabel = r"$f(x) = x^2$" plot.title = (r"LaTeX is Number $\sum_{n=1}^{\infty}" r"\frac{-e^{i\pi}}{2^n}$") plot.add(line) plot.tight = True plot.axesLabelSize = 18 plot.save(self.imageName)
def constructImage(self): plot = Plot() line = Line() line.yValues = [25, 40, 30, 23, 10, 50] line.xValues = range(len(line.yValues)) plot.add(line) plot.xLabel = "X Label" plot.yLabel = "Y Label" plot.yLimits = (0, 60) plot.xTickLabelSize = 24 plot.yTickLabelSize = 36 plot.axesLabelSize = 18 plot.tight = True plot.save(self.imageName)
def constructImage(self): line = Line() line.xValues = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] line.yValues = [0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100] plot = Plot() plot.useLatexLabels() plot.xLabel = r"$x$" plot.yLabel = r"$f(x) = x^2$" plot.title = ( r"LaTeX is Number $\sum_{n=1}^{\infty}" r"\frac{-e^{i\pi}}{2^n}$") plot.add(line) plot.tight = True plot.axesLabelSize = 18 plot.save(self.imageName)