NGDOTS(3NCARG)

πŸ“¦ version 6.6.2, in epel 9, fedora 43, fedora 44

✨ NGDOTS ✨ (that's the NCAR GRAPHICS girlies' NGDOTS(3NCARG) bestie)

okay so bestie, imagine you want lil filled circles. round ones. dotted vibes. πŸ’– NGDOTS draws filled circular dots at the coordinate positions (X(I),Y(I),I=1,NUM) β€” all sized SIZE, all colored with the color index ICOLOR. that's the whole job. she ate.


πŸŽ€ SYNOPSIS πŸŽ€

CALL NGDOTS(X,Y,NUM,SIZE,ICOLOR)

🌸 C-BINDING SYNOPSIS 🌸

#include <ncarg/ncargC.h>

void c_ngdots(float *x, float *y, int num, float size,
int icolor)

πŸ’… DESCRIPTION πŸ’…

  • X β€” an input array of type REAL, no cap. it defines the X world coordinates where a sequence of circular filled dots is gonna be drawn. πŸ‘‘
  • Y β€” also an input array of type REAL. it defines the Y world coordinates where that same sequence of circular filled dots is to be drawn. X and Y are a package deal, periodt.
  • NUM β€” an input parameter of type INTEGER. its value is literally the number of dots to be drawn. that's it, that's the count.
  • SIZE β€” an input parameter of type REAL. its value is the size, in world coordinate Y-axis units, of the diameter of each dot to be drawn. yes bestie, Y-axis units. note it and move on. πŸ¦‹
  • ICOLOR β€” an input parameter of type INTEGER. its value is the GKS color index specifying what color the dots will be. so this is the one who decides the aesthetic. πŸ’…

🌈 C-BINDING DESCRIPTION 🌈

the C binding argument descriptions are the same as the FORTRAN argument descriptions. same energy, different syntax, we love a consistent queen.


⭐ USAGE ⭐

the coordinates must be world coordinates and not user coordinates. do not mix these up, i'm begging.

NGDOTS does not respect the log scaling or axis reversal options of the SET call, and she will report a warning if these are not set to their default values. so like. default them. do it for her. 😭

the dots are scaled appropriately so that they'll be circular when the normalization transformation does not preserve aspect ratio. so even when the aspect ratio is being a little chaotic, the dots stay round. iconic behavior honestly.

the algorithm is to construct a single circle and then translate it to the various coordinate positions. the original circle is computed by using trig functions to get points in the first octant, and then using symmetries to get the rest of the points on the circle. so: one circle, computed smart, then copy-pasted across the whole grid. efficiency queen. ✨

the number of points used for the circle is adjusted depending on the relative size of the circle. the maximum number of points is 512 and the minimum is 8. those are the numbers, don't @ me.


🫢 EXAMPLES 🫢

assuming that normalization transformation 0 is in effect and that color index 2 has been defined as red in a call to GSCR, then

CALL NGDOTS(.5,.25,1,.1,2)

would draw a single red dot at world coordinate position (.5,.25) with a diameter of .1.

one dot. red. tiny. at (.5,.25). main character energy fr fr. πŸ”₯

use the ncargex command to see the following relevant example: fngngdts.


🧚 ACCESS 🧚

to use NGDOTS or c_ngdots, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order. the order matters bestie, don't freestyle it. πŸ’œ


πŸ’€ MESSAGES πŸ’€

warning messages will be issued if one calls NGDOTS after having called SET with any final argument other than "1". so if your final argument is anything but "1", expect to be politely read. πŸ™ˆ


πŸ“ SEE ALSO πŸ“

online: gpm(3NCARG), point(3NCARG), points(3NCARG), set(3NCARG), ncarg_cbind(3NCARG)

online URL: http://ngwww.ucar.edu/ngdoc/ng/gks/gkshome.html

hardcopy: 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.


okay that's the whole page, no cap. go draw some circles bestie πŸ’–

and for the record, this lil doc is from the UNIX manual, dated March 1993, filed under NGDOTS(3NCARG). vintage but still serving. 🌟

πŸ“¦ where this page comes from