WTSTR(3NCARG)

πŸ’– WTSTR β€” bestie, we're drawing text πŸ’–

So this is the WTSTR page from the NCAR GRAPHICS manual (section 3NCARG, iykyk ✨). It's a Fortran-callable routine that draws a specified text string at a specified position in the user coordinate system, and the call has arguments specifying the size, orientation, and centering of the string. Slay. πŸ’…


⚠️ STATUS ⚠️

Okay so bestie, listen. 😭 WTSTR specifies character sizes in Plotter Address Units (PAUs), and PAUs are no longer used in NCAR Graphics. So yeah β€” WTSTR is officially considered an obsolete routine. It's giving vintage. It's giving archive. 🫢

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 describes all these coordinate systems, periodt. πŸ“š

WTSTR is still hanging around for compatibility of early NCAR Graphics codes. So if you're out here writing new code, the glow-up is: use the way more general text writing routines from the Plotchar utility:

  • PLCHLQ
  • PLCHMQ
  • PLCHHQ

Those are the main characters now. πŸ‘‘

The following definition of the PAU Coordinate System is included so you can interpret and convert PAU codes β€” because we're not gonna leave you stranded:

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, and each one has the default value 10. You can set values of MX and MY with the routine SETI and get them back with the routine GETSI. 🧚


✨ SYNOPSIS ✨

CALL WTSTR(PX,PY,CH,IS,IO,IC)

That's the whole vibe check right there. 🌈


🌸 DESCRIPTION 🌸

Here's the whole cast of arguments, one by one, no skips:

  • PX β€” an input expression of type REAL. It defines the X user coordinate where the text string is to be drawn. πŸ“
  • PY β€” an input expression of type REAL. It defines the Y user coordinate where the text string is to be drawn. πŸ“
  • CH β€” an input constant or variable of type CHARACTER. This is literally the text string that's getting drawn. The star of the show. 🌟
  • IS β€” an input expression of type INTEGER. It specifies the character width in plotter address units (PAUs). (Yes, PAUs, we know, we know. πŸ™ˆ)
  • IO β€” an input expression of type INTEGER. It specifies the rotation angle of the text string, measured in degrees counter-clockwise from a horizontal orientation. Rotate her. πŸ”„
  • IC β€” an input expression of type INTEGER. It specifies the centering option, and it goes like this:
    • <0 β€” (PX,PY) will be in the vertical center of the left edge of the leftmost character in the original horizontal string. πŸ‘ˆ
    • =0 β€” (PX,PY) will be in the center of the text extent rectangle. 🎯
    • >0 β€” (PX,PY) will be in the vertical center of the right edge of the rightmost character in the original horizontal string. πŸ‘‰

And the lore: a call to WTSTR causes the SPPS polyline buffer to be flushed and leaves the "pen" β€” for subsequent calls to FRSTPT, VECTOR, PLOTIF, and PLOTIT β€” sitting at the location (PX,PY). So the pen is exactly where you left it, no cap. πŸ–ŠοΈβœ¨


πŸŽ€ ACCESS πŸŽ€

To use WTSTR, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β€” preferably in that order. Order matters bestie, don't fight it. πŸ’œ


πŸ¦‹ SEE ALSO πŸ¦‹

Online: gtx, gstxal, gstxp, gstxfp, gschh, gschsp, gschup, gschxp, gscr, gstxci, spps, plotchar, plchhq, plchmq, plchlq, pwrit, plotif, seti, getsi

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.


And that's the whole page, bestie!! 🫢 This was the UNIX version of the WTSTR(3NCARG) manual page, dated March 1993, brought to you by NCAR Graphics. Stay obsolete and iconic. πŸ’…βœ¨πŸŒΈ