diff options
author | rahulp13 | 2020-02-28 11:38:58 +0530 |
---|---|---|
committer | rahulp13 | 2020-02-28 11:38:58 +0530 |
commit | 246319682f60293b132fca1ce6e24689c6682617 (patch) | |
tree | 6871b758a17869efecfd617f5513e31f9a933f4a /Windows/spice/share/ngspice/scripts/setplot | |
parent | d9ab84106cac311d953f344386fef1c1e2bca1cf (diff) | |
download | eSim-246319682f60293b132fca1ce6e24689c6682617.tar.gz eSim-246319682f60293b132fca1ce6e24689c6682617.tar.bz2 eSim-246319682f60293b132fca1ce6e24689c6682617.zip |
initial commit
Diffstat (limited to 'Windows/spice/share/ngspice/scripts/setplot')
-rw-r--r-- | Windows/spice/share/ngspice/scripts/setplot | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/Windows/spice/share/ngspice/scripts/setplot b/Windows/spice/share/ngspice/scripts/setplot new file mode 100644 index 00000000..38ca0da1 --- /dev/null +++ b/Windows/spice/share/ngspice/scripts/setplot @@ -0,0 +1,64 @@ +* set the current working plot +.control + +begin + unset resp + if $argc + set resp = $argv[1] + else + if $?plots = 0 + echo Error: there aren\'t any plots currently loaded. + goto bottom + else + if $#plots = 0 + echo Error: there aren\'t any plots currently loaded. + goto bottom + end + end + + if $?resp = 0 + set oldplot = $curplot + echo ' Type the name of the desired plot:' + echo '' + echo ' new New plot' + foreach pl $plots + set curplot = $pl + strcmp i $pl $oldplot + if $i = 0 + echo "Current $pl $curplottitle ({$curplotname})" + else + echo " $pl $curplottitle ({$curplotname})" + end + end + set curplot = $oldplot + echo -n '? ' + set resp = $< + end + end + + + strcmp i $resp "" + if $i = 0 + goto bottom + end + + strcmp i $resp new + if $i = 0 + set curplot = new + goto bottom + end + + foreach pl $plots + strcmp i $resp $pl + if $i = 0 + set curplot = $pl + goto bottom + end + end + + echo Error: no such plot name $resp + + label bottom + + unset resp i pl newflag oldplot +end |