Configure an XY plot with a script like this:
# pvs[0] - minimum PV
# pvs[1] - maximum PV
# pvs[2] - man/auto PV
# All configured to trigger the script
from org.csstudio.display.builder.runtime.script import PVUtil
widget.setPropertyValue('y_axes[0].autoscale', PVUtil.getLong(pvs[2]) > 0)
widget.setPropertyValue('y_axes[0].minimum', PVUtil.getDouble(pvs[0]))
widget.setPropertyValue('y_axes[0].maximum', PVUtil.getDouble(pvs[1]))
print("Set to %lf, %lf" % (PVUtil.getDouble(pvs[0]), PVUtil.getDouble(pvs[1])))
When enabling autoscale, the widget will immediately autoscale.
When disabling autoscale, however, the axis keeps its most recent limits.
Need to trigger the script once more, updating minimum and/or maximum once more, to get the desired manual min..max range
Configure an XY plot with a script like this:
When enabling autoscale, the widget will immediately autoscale.
When disabling autoscale, however, the axis keeps its most recent limits.
Need to trigger the script once more, updating minimum and/or maximum once more, to get the desired manual min..max range