def __init__(self, label, color): line = Line() line.marker = "." line.label = label line.color = color self.line = line scatter = Scatter() scatter.marker = "x" scatter.color = color scatter.markerSize = 200 self.scatter = scatter
j = 0 for i in zero_crossings: xval = x[i] yval = surf[i] roadFeatures[j, 0] = xval roadFeatures[j, 1] = yval j = j + 1 ### Plotting scatter = Scatter() scatter.xValues = x scatter.yValues = surf scatter.markerSize = 1 scatterPlot = Plot() scatterPlot.add(scatter) scatterPlot.xLabel = "X Data" scatterPlot.yLabel = "Height" scatterPlot.title = "Surface (raw)" layout = PlotLayout() layout.addPlot(scatterPlot) #layout.plot() layout.save("profile1.png") # now plot the gradient scatter.yValues = surfGradient scatterPlot.yLabel = "dHeight/dX"