This commit is contained in:
x03daop
2015-09-01 10:09:12 +02:00
parent e104c934af
commit f3c57cbe5a
26 changed files with 789 additions and 11 deletions

View File

@@ -0,0 +1,19 @@
"""
Custom plot: Example of creating a 1D plot for a 2D scan where each scanned row is a series
"""
#Setting the 1d preference would create in the place of the matrix plot, a 1d plot where
#each scanned column is a series
#set_preference(Preference.PLOT_TYPES, {'ai1':1})
p = plot(None, context="1d Plot")[0]
def AfterReadout(record, scan):
if record.setpoints[1] == scan.getStart()[1]:
p.addSeries(LinePlotSeries(str(record.positions[0])))
p.getSeries(p.numberOfSeries-1).appendData(record.positions[1], record.values[0])
ascan((ao1,ao2), (ai1), (0,10), (20,30), (20,20), 0.1, after_read=AfterReadout)