GSET_VP(3NCARG)

πŸ’– GSET_VP β€” bestie, we're setting the viewport πŸ’–

okay so this is a page from the NCAR GRAPHICS manual set, and the routine is gset_vp (say it with me: set viewport). It establishes a rectangular subspace of normalized device coordinates space. That's the whole job. She's simple. She's iconic. πŸ’…

but FIRST, a heads up that's giving caution tape:

Calls to gset_vp are discouraged with NCAR Graphics. Instead, use the c_set routine, because c_set also supports mirror imaging and log scaling of axes. So like… she works, but her cousin eats. 🫢

✨ SYNOPSIS ✨

#include <ncarg/gks.h>

void gset_vp(Gint tran_num, const Glimit *vp_limits);

🌸 DESCRIPTION 🌸

  • tran_num β€” (Input) a normalization transformation number. The number of available transformations is implementation specific, so it depends on who you ask, bestie. In the case of NCAR GKS-0A, two normalization transformations are provided:
    1. 0 β€” selects the identity transformation, in which both the window and viewport have the range of 0. to 1. in both coordinate directions. This is the default normalization transformation for GKS. It is also fixed within GKS β€” that is, it is illegal to call gset_vp with tran_num = 0. not her being off-limits 😭
    2. 1 β€” a normalization transformation in which the viewport is defined by vp_limits.x_min to vp_limits.x_max and vp_limits.y_min to vp_limits.y_max.
  • vp_limits.x_min β€” (Real, Input) the left horizontal coordinate of the viewport. πŸ‘ˆ
  • vp_limits.x_max β€” (Real, Input) the right horizontal coordinate of the viewport. Constraint check: 0. ≀ vp_limits.x_min < vp_limits.x_max ≀ 1. πŸ‘‰
  • vp_limits.y_min β€” (Real, Input) the bottom vertical coordinate of the viewport. πŸ‘‡
  • vp_limits.y_max β€” (Real, Input) the top vertical coordinate of the viewport. Constraint check: 0. ≀ vp_limits.y_min < vp_limits.y_max ≀ 1. πŸ‘†
  • Defaults: tran_num = 0, vp_limits.x_min = 0.0, vp_limits.x_max = 1.0, vp_limits.y_min = 0.0, vp_limits.y_max = 1.0

so if you just vibe and change nothing, you get the whole unit square. cozy. πŸ’œ


πŸŽ€ ACCESS πŸŽ€

To use the GKS C-binding routines, load the ncarg_gks and ncarg_c libraries. that's it, that's the whole ritual. ✨


πŸ¦‹ SEE ALSO πŸ¦‹

Online: set(3NCARG), gset_win(3NCARG), gsel_norm_tran(3NCARG), ginq_clip(3NCARG), gks(3NCARG), ncarg_gks_cbind(3NCARG)

Hardcopy: User's Guide for NCAR GKS-0A Graphics; 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.


and that's the whole page, bestie β€” go set that viewport, slay responsibly, and remember: the docs said gset_vp is discouraged, so maybe hit up c_set instead. periodt. πŸ’–βœ¨

this lil manual page came from the UNIX manual, dated March 1993, and it's the GSET_VP(3NCARG) page from NCAR Graphics β€” old but iconic, fr fr. πŸŽ€