37 lines
1.1 KiB
Python
37 lines
1.1 KiB
Python
p=plot(None)[0]
|
|
|
|
import ch.psi.pshell.plot.RangeSelectionPlot as RangeSelectionPlot
|
|
import org.jfree.ui.RectangleAnchor as RectangleAnchor
|
|
import org.jfree.ui.TextAnchor as TextAnchor
|
|
|
|
def plot_psss(p):
|
|
"""
|
|
if len(p.getMarkers())==0:
|
|
m1=p.addMarker(0,None,"",Color.WHITE)
|
|
m2=p.addMarker(0,None,"",Color.WHITE)
|
|
m2.setLabelAnchor(RectangleAnchor.TOP)
|
|
else:
|
|
m1,m2 = p.getMarkers()
|
|
"""
|
|
if len(p.getMarkers())==0:
|
|
m=p.addIntervalMarker(0,0, None,"", RangeSelectionPlot().getSelectionColor())
|
|
m.setLabelAnchor(RectangleAnchor.BOTTOM)
|
|
else:
|
|
m = p.getMarkers()[0]
|
|
|
|
x,y = frange(0,40,1.0), frange(100,180,2.0)
|
|
if (x is None) or (y is None):
|
|
p.getSeries(0).clear()
|
|
else:
|
|
p.getSeries(0).setData(x,y)
|
|
|
|
#m1.value, m2.value= psss_center.take() - psss_fwhm.take(), psss_center.take() + psss_fwhm.take()
|
|
#m2.label = str(psss_center.take())
|
|
|
|
m.startValue, m.endValue = 10.0, 20.0
|
|
m.label = str(15.0)
|
|
|
|
|
|
while True:
|
|
plot_psss(p)
|
|
time.sleep(1.0) |