Block Axis Scaling

This will block all attempts to scale the bottom axis. Modify to include other axes as well.

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


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 10

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More