*! version SWS3/stb-2:gr3/stb-12:gr3.1 gr3 utility * see comments at end-of-file program define _3drshow version 2.1 capture conf var _vy _vyy _vx if _rc { #delimit ; di in red "3d-graph data not in memory -- you must specify variables" ; #delimit cr exit 198 } mac def _options "T1title(string) Connect(string) Symbol(string) APen(int 3) DPen(int 2) LPen(int 1) TPen(int 3) SPen(int 3) PSize(int 115) L1title(string) B2title(string) Rot(int 999) Elev(int 999) *" parse "%_*" if %_rot!=999 | %_elev!=999 { if %_rot==999 { mac def _rot "%D3lrot" } if %_elev==999 { mac def _elev "%D3lelev" } capture { /* break would be problem */ _3drproj %_rot %_elev 0 } if _rc { mac def _rc = _rc restore exit %_rc } } /* break key no longer problem */ if "%_t1title"=="" { mac def _t1title " " } if "%_connect"=="" { mac def _connect "." } if "%_symbol"=="" { mac def _symbol "o" } if "%_l1title"=="" { mac def _l1title " " } if "%_b2title"=="" { mac def _b2title " " } capture conf var _shadow if _rc==0 { #delimit ; noisily graph _vybase _shadow _vy _vyy _vyl _vx, t1("%_t1title") c(..`%_connect`l.) s(..`%_symbol`i[_name]) gap(2) noax pen(%_spen`%_spen`%_dpen`%_apen`%_tpen) psize(%_psize) l1("%_l1title") b2("%_b2title") %_options ; #delimit cr exit } #delimit ; capture noisily graph _vy _vybase _vy _vyy _vyl _vx, t1("%_t1title") c(||`%_connect`l.) s(ii`%_symbol`i[_name]) gap(2) noax pen(%_lpen`%_lpen`%_dpen`%_apen`%_tpen) psize(%_psize) l1("%_l1title") b2("%_b2title") %_options ; #delimit cr end exit /* _3drshow [, options] Reshow list 3d graph. Options are: APen(#) pen for drawing axis, default 3 DPen(#) pen for drawing data, default 2 LPen(#) pen for drawing lines to plane, default 1 TPen(#) pen for drawing "text", default 1 SPen(#) pen for shadow, default 3 PSize(#) size of text, default 115 Rot(#) new rotation angle, default is old angle Elev(#) new elevation angle, default is old angle Symbol(s) symbol for data. May be [varname] only if s([varname]) specified when graph originally generated. Default s(o) Connect(c) whether to connect data points, default c(.) other graph options All title options will work, but t1() is recommended. Note, if rot() or elev() are specified, the graph is reprojected. */