GSWN(3NCARG)

πŸ’– GSWN β€” set window (the 3NCARG era) πŸ’–

okay bestie, this one lives in the NCAR GRAPHICS manual, section 3NCARG, and it's here to tell you how to draw a little rectangle in world-coordinate space and call it a window. yes, like a window. like you're picking a specific lil rectangle of your giant coordinate universe and being like "this. this is the part we care about." iconique.


✨ NAME ✨

GSWN β€” that's Set window β€” establishes a window, or rectangular subspace, of world coordinates to be plotted.

okay so real talk: calls to GSWN are discouraged with NCAR Graphics. like, it's giving deprecated-but-still-here energy. instead, use the SET subroutine, because SET also supports mirror imaging and log scaling of axes. so like, GSWN works, but SET ate and left no crumbs. 🫢

🌸 SYNOPSIS 🌸

CALL GSWN (TRNUM, XMIN, XMAX, YMIN, YMAX)

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

#include <ncarg/gks.h>

void gset_win(Gint tran_num, const Glimit *win_limits);

πŸ’… DESCRIPTION πŸ’…

okay so here's the whole cast of characters, one by one, no skips:

  • TRNUM β€” (Integer, Input) β€” a normalization transformation number. the way that the number of available transformations is implementation specific... yeah. it depends on who built your GKS. 😭 but in the case of NCAR GKS-0A, you get exactly two normalization transformations, and here they are:
    • 0 β€” selects the identity transformation, where both the window and viewport have the range of 0. to 1. in both coordinate directions. this is the default normalization transformation for GKS. and it's also fixed within GKS β€” meaning it is illegal to call GSWN with TRNUM = 0. 🚨 like do not do it. it's not a vibe. it's a crime (in the GKS sense).
    • 1 β€” a normalization transformation where the window is defined by XMIN to XMAX and YMIN to YMAX. this is the one you actually want, bestie.
  • XMIN β€” (Real, Input) β€” the left horizontal coordinate of the window. XMIN < XMAX
  • XMAX β€” (Real, Input) β€” the right horizontal coordinate of the window.
  • YMIN β€” (Real, Input) β€” the bottom vertical coordinate of the window. YMIN < YMAX
  • YMAX β€” (Real, Input) β€” the top vertical coordinate of the window.

🌈 ACCESS 🌈

to use GKS routines, load the NCAR GKS-0A library ncarg_gks. that's the key to the kingdom, periodt. πŸ”‘


πŸŽ€ SEE ALSO πŸŽ€

Online: set, gsvp, gselnt, gqclip, gset_win

Hardcopy: NCAR Graphics Fundamentals, UNIX Version; User's Guide for NCAR GKS-0A Graphics

iykyk, go read the hardcopy if you want the full lore. πŸ“š


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 β€” this one came from the UNIX manual, dated March 1993, and it's filed under GSWN(3NCARG) in the NCAR GRAPHICS set. go set your windows (or better yet, use SET, she's the moment). slay, stay in your coordinate range, and don't you dare pass TRNUM = 0. πŸ’–βœ¨πŸŽ€πŸ¦‹