Block Axis Scaling
RGerkin
1) Put this function in a procedure file:
function BlockScale(info)
struct wmwinhookstruct &info
if(info.eventCode == 8)
variable minn = str2num(GetUserData(info.winName,"","minn"))
variable maxx = str2num(GetUserData(info.winName,"","maxx"))
setaxis /w=$info.winName bottom minn,maxx
else
getaxis /q /w=$info.winName bottom
setwindow $info.winName userdata(minn) = num2str(v_min)
setwindow $info.winName userdata(maxx) = num2str(v_max)
endif
end
struct wmwinhookstruct &info
if(info.eventCode == 8)
variable minn = str2num(GetUserData(info.winName,"","minn"))
variable maxx = str2num(GetUserData(info.winName,"","maxx"))
setaxis /w=$info.winName bottom minn,maxx
else
getaxis /q /w=$info.winName bottom
setwindow $info.winName userdata(minn) = num2str(v_min)
setwindow $info.winName userdata(maxx) = num2str(v_max)
endif
end
2) Turn it on with this:
setwindow kwtopwin hook(BlockScale) = BlockScale
3) Turn it off with this:
setwindow kwtopwin hook(BlockScale) = $""
Forum
Support
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More