from gram import Plot read("data6.py") read("data6b.py") gp = Plot() gp.baseName = 'regression' gp.scatter(xx1, yy1, plotMark='square') g = gp.line(xx2, yy2, smooth=True) g.lineThickness = 'thick' gp.maxYToShow=100 gp.minXToShow=-2 gp.xAxis.title = None gp.yAxis.title = None gp.png() gp.svg()
gp.xYText(5, colorY, "-") gp.xYText(6, colorY, "+") gp.xYText(7, colorY, "-") gp.xYText(8, colorY, "+") fillY = 15 gp.xYText(3, fillY, "fill") gp.xYText(5, fillY, "-") gp.xYText(6, fillY, "-") gp.xYText(7, fillY, "+") gp.xYText(8, fillY, "+") gp.yAxis.title = None gp.xAxis.title = None gp.yAxis.styles.remove('ticks') gp.xAxis.styles.remove('ticks') gp.frameT = None gp.frameB = None gp.frameL = None gp.frameR = None gp.contentSizeX = 4.0 gp.contentSizeY = 7.0 gp.minXToShow = 0 gp.maxYToShow = 16 gp.pdf() gp.font = 'helvetica' gp.svg()
xx1 = [] yy1 = [] for k in range(23): xx1.append(random.random()) yy1.append(random.random()) gp = Plot() gp.contentSizeX = 2.5 gp.contentSizeY = 2. thePlotMark = plotmarks[(2 * i) +j] c = gp.scatter(xx1, yy1, plotMark=thePlotMark) gp.minXToShow = 0.0 gp.minYToShow = 0.0 gp.maxXToShow = 1.0 gp.maxYToShow = 1.0 theText = '[%i.%i]' % (i, j) c = gp.xYText(0.5, 0.5, theText) c.colour = 'blue' if i == 0: gp.xAxis.title = None gp.xAxis.styles.remove('ticks') else: gp.xAxis.title = 'xx1' if j == 0: gp.yAxis.title = 'yy1' else: gp.yAxis.title = None gp.yAxis.styles.remove('ticks') gp.gX = j * 3.2
from gram import Plot read("data1.py") gp = Plot() gp.svgPxForCm = 100 gp.baseName = 'scatter' gp.scatter(xx1, yy1) gp.yAxis.title = 'scratches' gp.xAxis.title = 'itches' gp.minXToShow = 0 gp.maxXToShow = 12 gp.minYToShow = 0. gp.maxYToShow = 34 gp.png() gp.svg()
aa = list(range(1000)) for i in range(len(aa)): aa[i] /= 10. xx = [] yy = [] for i in range(len(aa)): a = aa[i] ret = func.polar2square([a, 1.]) xx.append(ret[0] + (i * 0.02)) yy.append(ret[1] + (i * 0.01) * (i * i * 0.001)) from gram import Plot gp = Plot() gp.baseName = 'circle' g = gp.line(xx, yy) g.color = 'red' gp.xAxis.title = None gp.yAxis.title = None gp.maxYToShow = 10000 gp.font = 'helvetica' gp.png() gp.svg()