PLOTIT(3NCARG)

πŸ’– PLOTIT πŸ’– β€” like, the line-drawing routine, bestie

PLOTIT(3NCARG) β€” this one lives in the NCAR GRAPHICS manual, and it's basically a pen that you move around. No cap.


✨ NAME ✨

PLOTIT β€” a line-drawing routine, and the way we talk about it is all in terms of "pen moves". Most calls to PLOTIT specify whether the "pen" should be up (not drawing) or down (drawing), and then move it to a designated position in the metacode coordinate system. The polylines that come out of those pen moves get buffered, and some calls to PLOTIT literally just cause the SPPS polyline buffer to be flushed. That's it. That's the whole vibe. πŸ’…


🫠 STATUS 🫠

Okay so, real talk: metacode units are no longer used in NCAR Graphics. Which means PLOTIT is considered an obsolete routine. πŸ’€ Not cancelled exactly, but like… it's giving legacy.

The coordinate systems that are currently recognized are:

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

For the full description of these coordinate systems, go read the NCAR Graphics User Document "NCAR Graphics Fundamentals, UNIX Version". It's a whole thing, iykyk.

PLOTIT continues to be provided for compatibility of early NCAR Graphics codes. So if you're writing new code? Bestie. We suggest you use the routine PLOTIF instead, which uses fractional coordinates. Do that. 🫢

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

The metacode coordinates of a point are integers <code>IMX</code> and <code>IMY</code> between <code>0</code> and <code>32767</code> inclusive. The area addressed is a square in a "metacode space" that is usually mapped into a square subset of the addressable area of the plotting device. Metacode coordinates were used in calls to the routine PLOTIT and are returned in calls to FL2INT.

🌈 SYNOPSIS 🌈

CALL PLOTIT (IX,IY,IP)

πŸ¦‹ C-BINDING SYNOPSIS πŸ¦‹

#include <ncarg/ncargC.h>

void c_plotit(int ix, int iy, int ip);

πŸ‘‘ DESCRIPTION πŸ‘‘

  • IX β€” an input expression of type INTEGER, and it's the X metacode coordinate of the point to which the plotter pen is to be moved. ✨
  • IY β€” an input expression of type INTEGER, and it's the Y metacode coordinate of the point to which the plotter pen is to be moved. ✨
  • IP β€” an input expression of type INTEGER, and it decides whether the movement of the plotter pen to the point <code>(IX,IY)</code> happens with the pen up (IP = 0), or with the pen down (IP = 1). And if IP = 2, then no pen move occurs at all, but the SPPS polyline buffer is flushed. Also, for historical reasons, a "CALL PLOTIT (0,0,0)" will <em>also</em> flush the buffer. Throwback behaviour, honestly kind of iconic.

The size of the SPPS polyline buffer can be changed by calling the parameter-setting routine SETUSV to set the parameter <code>'PB'</code>. The legal range of <code>'PB'</code> is between <code>2</code> and <code>50</code>. For example, to set <code>'PB'</code> to <code>2</code>, use "CALL SETUSV ('PB',2)". 🌸

The SPPS polyline buffer is provided to increase drawing efficiency. She's efficient, she's buffered, she's doing her best. πŸŽ€


πŸ’œ C-BINDING DESCRIPTION πŸ’œ

The C-binding argument descriptions are the same as the FORTRAN argument descriptions. Literally the same. Same energy, different language. 🫢


🧚 ACCESS 🧚

To use PLOTIT or c_plotit, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β€” preferably in that order. Order matters bestie, don't test her. ⭐


πŸ“ SEE ALSO πŸ“

Online: gpl, fl2int, plotif, setusv, getusv, sflush, frstpt, vector, line, curve, 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.


And that's the whole page, babe. πŸ’– This was PLOTIT(3NCARG) from the UNIX manual, dated March 1993 β€” yes, she's an elder, and she still slays. Go use PLOTIF for your new stuff though, fr fr. πŸŽ€βœ¨