3 changed files with 113 additions and 0 deletions
-
23src/ciderinit
-
69src/devaxis
-
21src/devload
@ -0,0 +1,23 @@ |
|||
*** This is a sample spice/cider initialization file. |
|||
alias pl print line |
|||
alias pc print col |
|||
alias ds display |
|||
alias hi history |
|||
alias li listing |
|||
alias p plot |
|||
alias pr print |
|||
alias q quit |
|||
alias bye quit |
|||
alias exit quit |
|||
alias so source |
|||
alias ld load |
|||
alias xg xgraph tmp |
|||
alias sp setplot |
|||
alias dl devload |
|||
alias dx devaxis |
|||
set width = 80 height = 24 nosort noaskquit nobreak |
|||
set xbrushheight = 3 xbrushwidth = 3 |
|||
set unixcom |
|||
set hcopydevtype = postscript |
|||
set pointstyle = markers |
|||
set term = vt100 |
|||
@ -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 <x|y>" |
|||
end |
|||
end |
|||
else |
|||
echo "usage: devaxis <x|y>" |
|||
end |
|||
|
|||
unset axis flag |
|||
end |
|||
@ -0,0 +1,21 @@ |
|||
* initialize a device plot |
|||
.control |
|||
begin |
|||
unset devfile |
|||
if $argc = 1 |
|||
set devfile = $argv[1] |
|||
load $devfile |
|||
strcmp flag "$?&y" "1" |
|||
if ($flag = 0) |
|||
let yaxis = y[0] |
|||
transpose all |
|||
let xaxis = x[0] |
|||
transpose all |
|||
setscale yaxis |
|||
end |
|||
else |
|||
echo "usage: devload <filename>" |
|||
end |
|||
|
|||
unset devfile flag |
|||
end |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue