HALFAX(3NCARG)
β¨ HALFAX β¨
okay bestie, gather round, because we're talking about HALFAX from the NCAR Graphics world (that's the 3NCARG manual section, iykyk) π
What does it do? It draws orthogonal axes that intersect at a point you specify, and it slaps a set of labels on them that you also specify. That's it. That's the whole vibe. Two axes, one intersection point, labels if you want 'em. π
π SYNOPSIS
CALL HALFAX (MJRX,MNRX,MJRY,MNRY,XINT,YINT,IXLB,IYLB)
π C-BINDING SYNOPSIS
#include <ncarg/ncargC.h>
void c_halfax (int mjrx, int mnrx, int mjry, int mnry,
float xint, float yint, int ixlb, int iylb)
π DESCRIPTION
okay so here's the tea on every single argument, no skips, we're doing all of them π«Ά
MJRX,MNRX,MJRY,MNRYβ these are input expressions of type INTEGER. They set the major and minor divisions of the horizontal (X) axis and the vertical (Y) axis of the current viewport. But β and this is the plot twist β what they actually mean depends on whatever the internal parameterΒ΄LSΒ΄of SPPS is currently set to. So let's break it down, because it's giving "two completely different moods" π- πΈ If the value of
Β΄LSΒ΄implies that the axis is linear:MJRX(Y)specifies the number of major divisions of the X(Y) axis, andMNRX(Y)specifies the number of minor divisions within each major division. And here's the sneaky part, bestie: in each case the value is the number of spaces between grid lines or ticks β NOT the number of lines or ticks themselves. So, including the ones sitting at the ends of the axes, there is always one more major division line or mark than the number of major divisions you gave inMJRX(Y). Similarly, there is always one less minor division line or tick per major division than the number of minor divisions per major division you gave inMNRX(Y). math is mathing, just backwards, we love that for us π - π¦ If the value of
Β΄LSΒ΄implies that the axis is logarithmic: every major division point lands at a value of10**MJRX(Y)times the previous point. example time: if the minimum X-axis value were3., the maximum X-axis value3000., andMJRXwere1, then the major division points would be3.,30.,300., and3000.β¨ And ifMNRX(Y).LE.10, there are nine minor divisions inside each major division. like, between3.and30.there'd be minor division points at6.,9.,12.,. . .27.But ifMNRX(Y).GT.10., the minor divisions are just omitted. gone. not invited. π
- πΈ If the value of
XINTandYINTβ input expressions of type REAL, and they're the user coordinates of the point where the two axes cross paths. the meet-cute. the intersection. π«ΆIXLBβ an input expression of type INTEGER, defined like this:IXLB = -1implies that no X axis is to be drawn.IXLB = 0implies that the X axis is to be drawn unlabeled.IXLB = 1implies that the X axis is to be drawn and labeled. β¨
IYLBβ an input expression of type INTEGER, defined like this:IYLB = -1implies that no Y axis is to be drawn.IYLB = 0implies that the Y axis is to be drawn unlabeled.IYLB = 1implies that the Y axis is to be drawn and labeled. β¨
π§ C-BINDING DESCRIPTION
The C-binding argument descriptions are the same as the FORTRAN argument descriptions. same energy, different syntax, we stay consistent π
π₯ USAGE
The statement
CALL HALFAX (MJRX,MNRX,MJRY,MNRY,XINT,YINT,IXLB,IYLB)
is equivalent to
CALL GRIDAL (MJRX,MNRX,MJRY,MNRY,IXLB,IYLB,10,XINT,YINT)
so likeβ¦ HALFAX is basically GRIDAL with the 10 already baked in. main character with a preset. periodt π
π EXAMPLES
Use the ncargex command to see the following relevant example: tgrida. go look, it's cute, it's iconic, it'll click π
π ACCESS
To use HALFAX or c_halfax, 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:
gridall,gacolr,gagetc,gageti,gagetr,gasetc,gaseti,gasetr,grid,gridal,gridl,labmod,perim,periml,tick4,ticks,ncarg_cbind. - Hardcopy:
NCAR Graphics Fundamentals, UNIX Version
Β©οΈ COPYRIGHT
Copyright (C) 1987-2009
University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
ok so that's the whole page, no cap, every single argument and default accounted for π«Ά go draw those axes, bestie, you're gonna ate π
and that's a wrap on the HALFAX(3NCARG) page from the UNIX manual, dated March 1993 β vintage but still serving β¨
π¦ 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