MXMY(3NCARG)

πŸ’– MXMY β€” bestie, come get your pen position πŸ’–

NCAR GRAPHICS Β· manual page MXMY(3NCARG) Β· section 3, the "library routines" girlies πŸŽ€


✨ NAME ✨

MXMY β€” it grabs the current pen position for you, in the Plotter Address Unit (PAU) coordinate system. That's it, that's the whole job. πŸ’…


🌸 STATUS 🌸

okay so, real talk: PAUs are not being used in new NCAR Graphics routines, which means MXMY is officially considered an obsolete routine. she's a legacy icon, not a current one. 😭

The coordinate systems that are currently recognized are:

  • GKS world coordinates
  • GKS normalized device coordinates
  • NCAR Graphics fractional coordinates
  • NCAR Graphics user coordinates

If you wanna know what all of those actually mean, go read the NCAR Graphics document "NCAR Graphics Fundamentals, UNIX Version" β€” it has the full description, no cap. πŸ“–

MXMY is still here for compatibility with early NCAR Graphics codes, and that's genuinely why she stays. Back in the day, people would hit FRSTPT and then MXMY back-to-back to effectively convert from user coordinates to plotter coordinates. If that's your goal, bestie, the functions KUPX and KUPY may be used instead. 🫢

Writing new code? You could keep track of the pen location through internal bookkeeping (very DIY of you). But better would be to use fractional coordinates for the purposes to which plotter coordinates were put β€” the functions CFUX, CFUY, CUFX, and CUFY allow for conversions between user coordinates and fractional coordinates. slay. ✨

The following definition of the PAU Coordinate System is included for the purpose of interpreting and converting PAU codes:

The plotter coordinates of a point are integers IPX and IPY, where IPX is between 1 and 2**MX and IPY is between 1 and 2**MY. MX and MY are internal parameters of SPPS; each has the default value 10. Values of MX and MY can be set by routine SETI and retrieved by routine GETSI.

πŸ¦‹ SYNOPSIS πŸ¦‹

CALL MXMY (IX,IY)

πŸ‘‘ DESCRIPTION πŸ‘‘

  • IX β€” an output variable of type INTEGER. It's the X coordinate of the pen position in PAUs. πŸ’–
  • IY β€” an output variable of type INTEGER. It's the Y coordinate of the pen position in PAUs. πŸ’–

πŸ’… USAGE πŸ’…

The routines CURVE, FRSTPT, LINE, PLOTIF, PLOTIT, POINT, POINTS, and VECTOR update the pen position for subsequent MXMY retrieval. like, they move the pen, and then MXMY tells you where it ended up. ✨

Also β€” the routines PWRIT and WTSTR leave the pen position at the location specified by their first two arguments. noted, bestie. πŸ“


🌈 ACCESS 🌈

To use MXMY, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. yes, in that order, don't get cute with it. πŸ’œ


πŸ“ SEE ALSO πŸ“

Online: curve, frstpt, line, plotit, point, points, pwrit, vector, seti, getsi, cpfx, cpfy, cpux, cpuy, kfpx, kfpy, kpmx, kpmy, kmpx, kmpy, kupx, kupy, spps, spps_converters

Hardcopy: NCAR Graphics Fundamentals, UNIX Version; User's Guide for NCAR GKS-0A Graphics


Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.


ok that's the whole page, bestie, you ate it up πŸ’– go forth and convert your coordinates responsibly ✨

UNIX Β· March 1993 Β· MXMY(3NCARG) β€” mwah, kiss kiss, bye bye πŸŽ€πŸ¦‹