PWRIT(3NCARG)
โจ PWRIT โ bestie, it draws text โจ
okay so this is PWRIT, straight out of the NCAR GRAPHICS manuals (the 3NCARG section, iykyk), and it does exactly one thing: it draws a text string at a position you pick, in your user coordinate system. you tell it how big, how rotated, and how centered. that's the whole vibe. ๐
๐ธ NAME ๐ธ
PWRIT โ draws a specified text string at a specified position in the user coordinate system. the call has arguments specifying the size, orientation, and centering of the string. that's it, that's the girl. ๐
๐ STATUS ๐
okay so real talk. PWRIT is an earlier version of the routine WTSTR, except back in the day you had to tell it how many characters were in your text string as an argument. and now? both WTSTR and PWRIT are considered obsolete. not deprecated-cute. obsolete. ๐ญ
PWRIT keeps existing purely for compatibility with early NCAR Graphics codes. so if you're writing new code, bestie, please โ we are begging โ use the more general text writing routines of the Plotchar utility instead:
- PLCHLQ
- PLCHMQ
- PLCHHQ
those are the main characters now. PWRIT is the older sister who still shows up to the party. ๐ซถ
โจ SYNOPSIS โจ
CALL PWRIT (PX,PY,CH,NC,IS,IO,IC)
๐ DESCRIPTION ๐
okay so here's every single argument, no skips, no cuts, periodt:
PXโ an input expression of type REAL. it defines the X user coordinate where the text string is gonna be drawn. ๐PYโ an input expression of type REAL. it defines the Y user coordinate where the text string is gonna be drawn. ๐CHโ an input constant or variable of type CHARACTER. this is literally the text string that gets drawn. the whole point. ๐NCโ an input expression of type INTEGER. it specifies the number of characters in the'CH'text string. yes, you have to count them yourself. it's giving old school. ๐งฎISโ an input expression of type INTEGER. it specifies the character width in plotter address units (PAUs). ๐IOโ an input expression of type INTEGER. it specifies the rotation angle of the text string.IOis measured in degrees counter-clockwise from a horizontal orientation. spin that text, queen. ๐ICโ an input expression of type INTEGER. it specifies the centering option, and here's the breakdown:<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. the iconique middle-of-the-road choice. ๐ฏ>0โ(PX,PY)will be in the vertical center of the right edge of the rightmost character in the original horizontal string.
lowkey important: a call to PWRIT causes the SPPS polyline buffer to be flushed, and it leaves the "pen" (for subsequent calls to FRSTPT, VECTOR, PLOTIF, and PLOTIT) at the location (PX,PY). so like, know where your pen ends up. โ๏ธ
๐ฅ ACCESS ๐ฅ
to use PWRIT, you gotta load the NCAR Graphics libraries โ and yes, order matters:
ncargncarg_gksncarg_c
preferably in that order. don't fight it, just do it. ๐
๐ฆ SEE ALSO ๐ฆ
Online: gtx, gstxal, gstxp, gstxfp, gschh, gschsp, gschup, gschxp, gscr, gstxci, spps, plotchar, plchhq, plchmq, plchlq, wtstr, plotif, seti, getsi
Hardcopy: NCAR Graphics Fundamentals, UNIX Version; User's Guide for NCAR GKS-0A Graphics
๐ COPYRIGHT ๐
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, dated March 1993, filed under PWRIT(3NCARG). mwah. ๐ ๐๐ฆ
๐ฆ where this page comes from
- debian bookworm: libncarg-dev 6.6.2.dfsg.1-1
- debian trixie: libncarg-dev 6.6.2.dfsg.1-10+b2
- ubuntu jammy: libncarg-dev 6.6.2-10build2
- ubuntu questing: libncarg-dev 6.6.2.dfsg.1-10build2
- ubuntu resolute: libncarg-dev 6.6.2.dfsg.1-12
- ubuntu stonking: libncarg-dev 6.6.2.dfsg.1-12build2
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms