From 246319682f60293b132fca1ce6e24689c6682617 Mon Sep 17 00:00:00 2001 From: rahulp13 Date: Fri, 28 Feb 2020 11:38:58 +0530 Subject: initial commit --- Windows/spice/share/ngspice/scripts/devaxis | 69 +++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Windows/spice/share/ngspice/scripts/devaxis (limited to 'Windows/spice/share/ngspice/scripts/devaxis') diff --git a/Windows/spice/share/ngspice/scripts/devaxis b/Windows/spice/share/ngspice/scripts/devaxis new file mode 100644 index 00000000..7b3d23f3 --- /dev/null +++ b/Windows/spice/share/ngspice/scripts/devaxis @@ -0,0 +1,69 @@ +* initialize a device plot +.control +begin + unset axis + if $argc = 1 + set axis = $argv[1] + strcmp flag $axis "x" + if ($flag = 0) + echo "setting axis to x" + strcmp flag "$?&devaxis" "0" + if ($flag = 0) + strcmp flag "$?&xaxis" "0" + if ($flag = 0) + echo "Error: no x axis present" + else + transpose all + setscale xaxis + let devaxis = 1 + end + else + strcmp flag "$&devaxis" "-1" + if ($flag = 0) + strcmp flag "$?&xaxis" "0" + if ($flag = 0) + echo "Error: no x axis present" + else + transpose all + setscale xaxis + let devaxis = 1 + end + end + end + else + strcmp flag $axis "y" + if ($flag = 0) + echo "setting axis to y" + strcmp flag "$?&devaxis" "0" + if ($flag = 0) + strcmp flag "$?&yaxis" "0" + if ($flag = 0) + echo "Error: no y axis present" + else + setscale yaxis + let devaxis = -1 + end + else + strcmp flag "$&devaxis" "1" + if ($flag = 0) + strcmp flag "$?&yaxis" "0" + if ($flag = 0) + echo "Error: no y axis present" + else + transpose all + setscale yaxis + let devaxis = -1 + end + end + end + else + echo "Error: unknown axis" $axis + echo "usage: devaxis " + end + end + else + echo "usage: devaxis " + end + + unset axis flag +end -- cgit