GPOLYLINE(3NCARG)
β¨ NAME β¨
gpolyline β draws line segments connecting a sequence of user-specified coordinate pairs π«
Okay bestie, if you've ever been like "I have a bunch of points and I want a line through them," this is literally the function. It's from NCAR Graphics, the GKS C-binding era, and she's iconic.
πΈ SYNOPSIS πΈ
#include <ncarg/gks.h>
void gpolyline(const Gpoint_list *point_list);
π DESCRIPTION π
gpolyline (aka Polyline) is an output primitive β which is fancy speak for "it draws stuff" β and what it draws is line segments connecting a sequence of user-specified coordinate pairs. You hand it points, it connects them. Periodt. π
Here's the tea on the one argument you're passing:
point_list.num_pointsβ (Gint, Input) the number of points in the line you're drawing. Heads up: this must be larger than one. Like, one single point is not a line, bestie, that's just a dot. π«Άpoint_list.pointsβ (Gint *, Input) the X and Y coordinates of thepoint_list.num_pointspoints that are gonna get connected by line segments. And those coordinates are specified in world coordinates. Keep that in mind, it matters, I'll explain in a sec. π¦
π USAGE π
So here's the thing you absolutely need to know: those coordinate pairs have to be in world coordinates, not user coordinates. Not a vibe check you want to fail.
And because of that whole world-coordinates situation, some things just don't apply here. Specifically:
- the log scaling and mirror-imaging features you can get via the
c_setcall β nope, not applicable here π - the SPPS functions for drawing lines β also not applicable here π
That's just how it is, no cap. This function does its one job and does it well. π
π ACCESS π
Wanna actually use the GKS C-binding routines? You gotta load the ncarg_gks and ncarg_c libraries. Do that or nothing happens, fr fr. π₯
β SEE ALSO β
Online: gset_linetype(3NCARG), gset_linewidth(3NCARG), gset_colr_rep(3NCARG), gset_line_colr_ind(3NCARG), ginq_linetype(3NCARG), ginq_linewidth(3NCARG), ginq_line_colr_ind(3NCARG), dashline(3NCARG), set(3NCARG), gks(3NCARG), ncarg_gks_cbind(3NCARG)
Hardcopy: User's Guide for NCAR GKS-0A Graphics; NCAR Graphics Fundamentals, UNIX Version "The Use of X/Y Coordinates in NCAR Graphics" *SCD User Document"
π COPYRIGHT π
Copyright (C) 1987-2009 University Corporation for Atmospheric Research The use of this Software is governed by a License Agreement.
ok that's the whole page, you're basically a GKS girlie now π go draw some lines and slay β¨
mwah π this was the UNIX manual, March 1993, page GPOLYLINE(3NCARG) β stay iconic, bestie π
π¦ 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