PERIM(3NCARG)

✨ PERIM β€” the perimeter queen ✨

okay so bestie, we're in the NCAR GRAPHICS section of the manual, page PERIM(3NCARG), and this one is a whole vibe. πŸ’…

🌸 NAME 🌸

PERIM draws an unlabeled perimeter with tick marks that point inward. and if you wanna switch up the directions and lengths of those tick marks? you can do that by calling TICKS and/or TICK4. that's it. that's the function. lowkey iconic.


πŸŽ€ SYNOPSIS πŸŽ€

CALL PERIM (MJRX, MNRX, MJRY, MNRY)

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

#include <ncarg/ncargC.h>

void c_perim (int mjrx, int mnrx, int mjry, int mnry)

πŸ’– DESCRIPTION πŸ’–

MJRX, MNRX, MJRY, and MNRY

these four are input expressions of type INTEGER, and they specify the major and minor divisions of the horizontal (X) and vertical (Y) axes of the current viewport. sounds simple right? NOT SO FAST. their meaning depends entirely on the current setting of the internal parameter Β΄LSΒ΄ of SPPS. so let's break it down, bestie:

  • if the value of Β΄LSΒ΄ implies that the axis is linear: MJRX(Y) specifies the number of major divisions of the X(Y) axis, and MNRX(Y) specifies the number of minor divisions within each major division. and here's the catch β€” in each case, the value specifies the number of spaces between grid lines or ticks rather than the number of lines or ticks themselves. meaning: including the ones at the ends of the axes, there is always one more major division line or mark than the number of major divisions specified by MJRX(Y). similarly, there is always one less minor division line or tick per major division than the number of minor divisions per major division specified by MNRX(Y). math is mathing, we just gotta count the gaps not the lines. πŸ™ˆ
  • if the value of Β΄LSΒ΄ implies that the axis is logarithmic: each major division point occurs at a value 10**MJRX(Y) times the previous point. for example, if the minimum X-axis value were 3., the maximum X-axis value 3000. and MJRX 1, then the major division points would be 3., 30., 300., and 3000. β€” slay. and if MNRX(Y).LE.10, there are nine minor divisions within each major division. for example, between 3. and 30., there would be minor division points at 6., 9., 12., . . . 27. but if MNRX(Y).GT.10., minor divisions are omitted. periodt.

🌈 C-BINDING DESCRIPTION 🌈

the C-binding argument descriptions are literally the same as the FORTRAN argument descriptions. no notes. 🫢


πŸ‘‘ USAGE πŸ‘‘

the statement

CALL PERIM (MJRX,MNRX,MJRY,MNRY)

is equivalent to

CALL GRIDAL (MJRX,MNRX,MJRY,MNRY,0,0,5,0.,0.)

same energy, different font. iykyk. ✨


πŸ“ EXAMPLES πŸ“

use the ncargex command to see the following relevant examples: caredg, ccpset, cpex01, tgrida, tstrml, fcover, ffex00, ffex01, ffex02, ffex03, ffex04, ffex05.

that's a whole roster and every single one of them ate. go look at them fr fr. πŸ”₯


⭐ ACCESS ⭐

to use PERIM or c_perim, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. the order matters bestie, don't get cute with it.


🧚 SEE ALSO 🧚

Online: gridall, gacolr, gagetc, gageti, gagetr, gasetc, gaseti, gasetr, grid, gridal, gridl, halfax, labmod, periml, tick4, ticks, ncarg_cbind.

Hardcopy: NCAR Graphics Fundamentals, UNIX Version


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

okay that's the whole page, no cap. this one shipped back in March 1993 under the UNIX banner as PERIM(3NCARG) and it's still serving major main character energy. go draw your perimeter, bestie. πŸ’–βœ¨πŸŽ€