PLOTIF(3NCARG)
π NAME π
PLOTIF is a line-drawing routine, bestie, and it's described in terms of "pen moves" β yes like an actual pen, we're doing arts and crafts but make it FORTRAN. Most calls to PLOTIF tell you whether the "pen" should be up (not drawing, just vibing) or down (drawing, committing to the line) and then move it to a designated position in the fractional coordinate system. The polylines that come out of all this pen moving are buffered, and some calls to PLOTIF are just there to flush the SPPS polyline buffer. That's the whole job. Iconic.
β¨ SYNOPSIS β¨
CALL PLOTIF (FX,FY,IP)
π¦ C-BINDING SYNOPSIS π¦
#include <ncarg/ncargC.h>
void c_plotif (float fx, float fy, int ip)
πΈ DESCRIPTION πΈ
FXβ an input expression of typeREAL, it's the X fractional coordinate of the point where the plotter pen is getting moved to. Important lore: ifIP = 2, this argument is straight up ignored. It's not even invited to the party.FYβ an input expression of typeREAL, the Y fractional coordinate of the point where the plotter pen is getting moved to. And same deal: ifIP = 2, this argument is ignored too. Rude but true.IPβ an input expression of typeINTEGER, and it's the one making all the decisions here. It determines whether the movement of the plotter pen to the point(FX,FY)happens with the pen up (IP = 0) or with the pen down (IP = 1). And ifIP = 2, no pen move occurs at all β but the SPPS polyline buffer gets flushed. Three moods, one integer.
π C-BINDING DESCRIPTION π
The C-binding argument descriptions are literally the same as the FORTRAN argument descriptions. No notes, no differences, we love consistency. π
π USAGE π
Okay so here's how you actually use it, bestie:
"CALL PLOTIF (FX,FY,0)"β moves the pen to a new starting position. Pen up, no drawing, just relocating. Fresh start energy."CALL PLOTIF (FX,FY,1)"β moves the pen to a new position, drawing a straight line segment from the previous position to the new one. Pen down, we're committing."CALL PLOTIF (0.,0.,2)"β flushes the SPPS polyline buffer. That's it, that's the whole move.
The size of the SPPS polyline buffer can be changed by calling the parameter-setting routine SETUSV to set the parameter 'PB'. The legal range of 'PB' is between 2 and 50. For example, to set 'PB' to 2, use:
"CALL SETUSV ('PB',2)"
NOTE! π¨ The SPPS polyline buffer exists to increase drawing efficiency. But there are side effects, and they can occur because the polyline segments get buffered. For example, if you wanted to change the color of a line at a certain point, you'd have to remember to flush the buffer before calling GSPLCI to change the polyline color index. Do not skip this step, I am begging. And heads up β this applies to the changing of any polyline attribute, not just the color. So remember: flush first, then change stuff. π«Ά
π EXAMPLES π
Use the ncargex command to see the following relevant examples: arex01, cbex01, cmppos, coex03, cpexcc, epltch.
π ACCESS π
To use PLOTIF or c_plotif, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c β preferably in that order. Order matters, don't freestyle it.
β SEE ALSO β
- Online:
gpl,plotit,setusv,getusv,sflush,frstpt,vector,line,curve,spps,spps_params,ncarg_cbind - Hardcopy: NCAR Graphics Fundamentals, UNIX Version; User's Guide for NCAR GKS-0A Graphics
π COPYRIGHT π
Copyright (C) 1987-2009 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
Okay bestie that's the whole page!! This one came from the NCAR GRAPHICS manual, PLOTIF(3NCARG), and the footer on the original said UNIX and March 1993 β so yeah, this routine is a 1993 baddie and it still ate. π
β¨ Go draw some lines, ily, bye!! π¦πΈ
π¦ 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