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 the point_list.num_points points 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_set call β€” 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 (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 πŸŽ€