SET(3NCARG)
💖 SET — bestie, we're mapping coordinates 💖
okay so this is the NCAR Graphics manual page for SET, from the 3NCARG corner of the universe. it's the routine that defines the mapping between fractional and user coordinates: it sets the values of the SPPS internal parameters 'LS' (axis linear/log scaling) and 'MI' (axis mirror imaging), and it defines GKS normalization transformation 1. no cap, that's a lot of job for one little subroutine but she's built different. ✨
🎀 SYNOPSIS 🎀
CALL SET(VL,VR,VB,VT,WL,WR,WB,WT,LF)
🦋 C-BINDING SYNOPSIS 🦋
#include <ncarg/ncargC.h>
void c_set(float vl, float vr, float vb, float vt, float wl, float wr,
float wb, float wt, int lf)
🌸 DESCRIPTION 🌸
here's the whole cast of characters, one by one, and yes every single one of them is required 💅
VL— an input expression of typeREAL. she defines the left margin of the viewport in fractional coordinates.VR— an input expression of typeREAL. the right margin of the viewport, in fractional coordinates.VB— an input expression of typeREAL. bottom margin of the viewport, fractional coordinates.VT— an input expression of typeREAL. top margin of the viewport, fractional coordinates.WL— an input expression of typeREAL. left margin of the window, in user coordinates.WR— an input expression of typeREAL. right margin of the window, in user coordinates.WB— an input expression of typeREAL. bottom margin of the window, in user coordinates.WT— an input expression of typeREAL. top margin of the window, in user coordinates.LF— an input expression of typeINTEGER. this one defines the linear/log nature of the mapping, and it goes like this:- linear X, linear Y
- linear X, log Y
- log X, linear Y
- log X, log Y
so like, LF is literally the vibe check for your axes. pick a number, any number (well, 1 through 4). 🔥
💜 C-BINDING DESCRIPTION 💜
good news bestie: the C-binding argument descriptions are the same as the FORTRAN argument descriptions. copy-paste energy, but make it official. 🫶
✨ USAGE ✨
okay this is the part where she gets interesting. when you're setting the limits of the viewport and the window, the left margin can have a user coordinate value that is larger than the user coordinate value at the right margin. yes really. that means the X axis scale will run from a maximum value at the left to a minimum value at the right. 🤯
likewise, the bottom value can exceed the top value, meaning that the Y axis can run from a maximum at the bottom to a minimum at the top. this reversal of the axes is referred to as "mirror imaging". and it represents a substantial functional enhancement over what is provided in GKS. that's literally why NCAR Graphics SET calls using fractional and user coordinates are in general preferred over GKS calls to GSVP and GSWN using normalized device coordinates and world coordinates. slay. 👑
🌈 EXAMPLES 🌈
use the ncargex command to see the following relevant examples: fcoord1, fcoord2, splogy, sprevx. here's the tea on each of them:
sprevxshows the use of routineSETfor an X axis scaling reversal.splogyshows the use of routineSETfor logarithmic scaling of the Y axis.fcoord1shows the mapping from GKS world coordinates to GKS normalized device coordinates.fcoord2shows the mapping from NCAR Graphics user coordinates to GKS normalized device coordinates.
⭐ ACCESS ⭐
to use SET or c_set, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c — preferably in that order. don't be chaotic about it, the order matters. 🙈
👑 SEE ALSO 👑
Online: gsvp, gswn, getset, getusv, setusv, spps, spps_params, ncarg_cbind
Hardcopy: NCAR Graphics Contouring and Mapping Tutorial; 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 — written on a UNIX system way back in March 1993, and this lil doc lives under SET(3NCARG) forever. iconic behavior from 1993 honestly. mwah. 💖✨
📦 where this page comes from
- epel 9: ncl-devel 6.6.2-59.el9 · LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 · LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 · LicenseRef-Callaway-BSD
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms