GRIDAL(3NCARG)

🌸 GRIDAL(3NCARG) β€” the NCAR GRAPHICS bestie who draws ALL the backgrounds πŸ’…

okay so welcome to GRIDAL, a total icon from the NCAR Graphics fam. She's the main character of background-drawing: every other background routine you've ever met? Yeah, they're all just doing a lil outfit change and calling GRIDAL underneath. periodt.


✨ NAME ✨

GRIDAL β€” draws any of the supported types of backgrounds. Each of the other background-drawing routines is implemented by a call to GRIDAL. no cap, she's the blueprint 🫢


πŸŽ€ UTILITY πŸŽ€

This routine is part of the Gridall utility in NCAR Graphics. Wanna see the overview man page for this utility? type:

man gridall

and slay πŸ’–


πŸ“œ SYNOPSIS πŸ“œ

CALL GRIDAL (MJRX, MNRX, MJRY, MNRY, IXLB, IYLB, IGPH,
+ XINT, YINT)

🌈 C-BINDING SYNOPSIS 🌈

#include <ncarg/ncargC.h>

void c_gridal (int mjrx, int mnrx, int mjry, int mnry,
int ixlb, int iylb, int igph, float xint, float yint)

πŸ’« DESCRIPTION πŸ’«

MJRX, MNRX, MJRY, MNRY β€” the axis division girlies

These 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. But here's the tea: what they actually mean depends on the current setting of the internal parameter 'LS' of SPPS. so like, pay attention 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. In each case, the value specifies the number of spaces between grid lines or ticks rather than the number of lines or ticks. 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, it's giving off-by-one but make it fashion ✨
  • 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. 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. If MNRX(Y).GT.10., minor divisions are omitted. bye minor divisions πŸ’€

IXLB β€” the X axis vibe check

an input expression of type INTEGER, defined as follows:

  • IXLB = -1 implies that no X axis is to be drawn. ghosted 🚫
  • IXLB = 0 implies that the X axis is to be drawn unlabeled.
  • IXLB = 1 implies that the X axis is to be drawn and labeled. fully dressed, iconic πŸ’…

IYLB β€” the Y axis vibe check

an input expression of type INTEGER, defined as follows:

  • IYLB = -1 implies that no Y axis is to be drawn. ghosted 🚫
  • IYLB = 0 implies that the Y axis is to be drawn unlabeled.
  • IYLB = 1 implies that the Y axis is to be drawn and labeled. fully dressed, iconic πŸ’…

IGPH β€” pick your background, bestie

an input expression of type INTEGER that specifies the background type, as follows:

  • 0 β€” X axis: grid, Y axis: grid
  • 1 β€” X axis: grid, Y axis: perim
  • 2 β€” X axis: grid, Y axis: halfax
  • 4 β€” X axis: perim, Y axis: grid
  • 5 β€” X axis: perim, Y axis: perim
  • 6 β€” X axis: perim, Y axis: halfax
  • 8 β€” X axis: halfax, Y axis: grid
  • 9 β€” X axis: halfax, Y axis: perim
  • 10 β€” X axis: halfax, Y axis: halfax
ngl bestie, 3 and 7 simply do not exist here. they're not in the list, don't come for me, I'm just the messenger πŸ™ˆ

XINT and YINT β€” where the axes meet

input expressions of type REAL. If IGPH has the value 10, these are the user coordinates of the point of intersection of the two axes. For other values of IGPH for which one of the axes is of type HALFAX, XINT and/or YINT specify the position of that axis. so like, they're the GPS coordinates of your axis, lowkey πŸ“


🧚 C-BINDING DESCRIPTION 🧚

The C-binding argument descriptions are the same as the FORTRAN argument descriptions. same energy, different font, iykyk πŸ’œ


πŸ”₯ EXAMPLES πŸ”₯

Use the ncargex command to see the following relevant examples: tgrida, ccpga, ccpmpxy. go look, they ate πŸ‘‘


πŸ‘‘ ACCESS πŸ‘‘

To use GRIDAL or c_gridal, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. order matters, don't be chaotic πŸŽ€


πŸ’¬ MESSAGES πŸ’¬

See the gridall man page for a description of all Gridall error messages and/or informational messages. she's got receipts πŸ“‹


🌸 SEE ALSO 🌸

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

Hardcopy: NCAR Graphics Contouring and Mapping Tutorial

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 bestie, you're officially a GRIDAL expert, no cap 🫢✨

this lil masterpiece came to you via UNIX, dated March 1993, filed under GRIDAL(3NCARG) β€” vintage but make it iconic, periodt πŸ’…πŸŒˆ