macro move_box * Pierre Juillot 25-10-95 * C.R.N Strasbourg * * to move the upper right corner of the statitics box to a point * of coordinates x0 cm, y0 cm, * PAW> exec move_box x0 y0 * will set print and set the corresponding smgr and smgu attributes * * Note: in case of ZONE Nx Ny, do for instance * PAW> exec move_box x0 y0 20 * where 20 is the current HPLOT NT # Xcm = [1] Ycm = [2] if [#] <= 1 then mess usage: PAW > exec move_box x0 y0 exitm 1 elseif [#] = 2 then hplot_transf=10 elseif [#] = 3 then hplot_transf= [3] endif * * 1. coordinates of ref. point in NDC in NT #1 selnt 1 XVpMin = $GRAFINFO('VPXMIN') YVpMin = $GRAFINFO('VPYMIN') XVpMax = $GRAFINFO('VPXMAX') YVpMax = $GRAFINFO('VPYMAX') XWnMax = $GRAFINFO('WNXMAX') YWnMax = $GRAFINFO('WNYMAX') x = [XVpMin]+(([Xcm]/[XWnMax])*([XVpMax]-[XVpMin])) y = [YVpMin]+(([Ycm]/[YWnMax])*([YVpMax]-[YVpMin])) * * 2. size of HPLOT window in current NT selnt [hplot_transf] XVpMin = $GRAFINFO('VPXMIN') YVpMin = $GRAFINFO('VPYMIN') XVpMax = $GRAFINFO('VPXMAX') YVpMax = $GRAFINFO('VPYMAX') DXMax=[XVpMax]-[XVpMin] DYMax=[YVpMax]-[YVpMin] * * 3. coordinates in "stat. box" frame smgr=$sigma(([XVpMax]-[x])/[DXMax]) smgr=$format([smgr],f8.4) smgu=$sigma(([YVpMax]-[y])/[DYMax]) smgu=$format([smgu],f8.4) * set smgr [smgr] set smgu [smgu] return