Dashpack(3NCARG)
π Dashpack(3NCARG) π
okay so bestie, pull up a chair because Dashpack is literally the glow-up of NCAR Graphics dash routines and we are obsessed. This is the manual page, part 1, and it's giving main character energy. π No cap.
πΈ NAME πΈ
Dashpack β a whole set of routines that let you draw curves using dashed-line patterns, and those patterns can include gap-portion specifiers, solid-portion specifiers, and label-string specifiers. Periodt. π
DASHPACK is intended to replace and unify the old family of NCAR Graphics routines (DASHLINE, DASHCHAR, DASHSMTH, and DASHSUPR), all of which date from the early 1970s or before. At the time of its introduction, DASHPACK will do anything that DASHLINE, DASHCHAR, and DASHSMTH will (and a number of things that they won't); it does not yet functionally replace all of DASHSUPR, but it is intended that this will eventually happen. For the moment, the older routines will stay in NCAR Graphics.
Structurally, DASHPACK is rather different from the routines that it replaces: its behavior is controlled by "internal parameters" that are accessed by calling parameter-access routines, rather than by manipulating the contents of labelled common blocks. There is only one version of DASHPACK; rather than load a different version of it in order to, say, turn smoothing on, one just changes the value of the internal parameter that controls whether or not smoothing is done. There is no analog of the old routines DASHDB and DASHDC in DASHPACK; to use a different dash pattern, one just changes the values of the internal parameters that specify what dash pattern to use.
As in other NCAR Graphics packages, each of the internal parameters of DASHPACK has a three-character mnemonic name. The internal parameters are described in detail in the man page dashpack_params.
β¨ Dashed-Line Patterns β¨
A dashed-line pattern (or just "dash pattern") may be specified using either an integer or a character string (see the parameters DPL, DPS, and DPT). However the pattern is specified, it is applied in a repetitive fashion as a curve is drawn. For example, if the dash pattern specifies a solid, a gap, and the label "A", a curve drawn using it will include a solid, a gap, the label "A", a solid, a gap, the label "A", and so on, until the end of the curve is reached. When a new curve is begun, use of the dash pattern starts over: the new curve starts with a solid, a gap, and the label "A".
If an integer dash pattern is used, the low-order "n" bits of the integer (where "n" is the absolute value of the user-specified parameter, DPS, and is between 1 and 32, inclusive) are interpreted; 0's represent gaps and 1's represent solids.
In a character-string dash pattern, the character used to represent a gap (by default, an underscore) and the character used to represent a solid (by default, a dollar sign) are determined by the values of other internal parameters (CRG and CRS); such characters may be mixed with other strings of characters that are to be used as label strings. There are parameters allowing one to specify how much distance along the curve should be devoted to each gap (WOG) and solid (WOS), what size characters should be used for writing label strings (WOC), whether label strings should be written at a fixed angle relative to the plotter frame or in the direction of the curve (SAF), and, if they are written in the direction of the curve, whether or not they should be made to "bend" with the curve (CRB and SCF) and whether or not it is allowed to rotate them by 180 degrees to make them more nearly upright on the plotter frame (SAF).
A label string written along a curve may either be placed in a gap left in the curve or just written on top of it (LS1, LS2, and LTL); the latter is most effective when the characters are written in a color different from that of the curve itself.
Output of label strings is buffered so that, if the end of the curve occurs prior to the occurrence of the next solid or gap in the dash pattern, the curve itself may be drawn in lieu of an incomplete label, and so that, when labels are being made to "bend" with the curve, the entire label can be inverted, if necessary, so as to have the majority of it right-side up. This buffering is done by default, but may be turned off, if desired (SBF).
All character strings are written using calls to PLOTCHAR routines. There is an internal parameter (PCF) that says whether to call PLCHHQ, PLCHMQ, or PLCHLQ. By default, PLCHHQ is used.
π Curve Smoothing π
Curve smoothing is turned on and off by setting a single internal parameter (TCS) that also specifies the tension on the cubic splines used to do the smoothing. Another parameter (SSL) specifies the distance between points used to plot the smoothed curve and another (EPS) specifies the minimum distance between input points required for them to be considered separate points.
π SYNOPSIS π
DPCURVβ draws a complete curve with a single call.DPDRAWβ called to just draw the curve by connecting a given sequence of points.DPFRSTβ does a "pen-up" move to the first in a sequence of points defining a curve.DPGETCβ called with the name of an internal parameter of type CHARACTER and a character variable in which the value of that parameter is to be returned.DPGETIβ called with the name of an internal parameter of type INTEGER or REAL and an integer variable in which the integer equivalent of the value of that parameter is to be returned.DPGETRβ called with the name of an internal parameter of type INTEGER or REAL and a real variable in which the real equivalent of the value of that parameter is to be returned.DPLASTβ called to say that the latest call toDPVECTwas the last one in the sequence, that drawing of the curve should be completed, and that buffers should be flushed.DPLINEβ draws the straight line joining two points. (No smoothing takes place, even if smoothing is turned on.)DPSETCβ called with the name of an internal parameter of type CHARACTER and a character variable or constant that is to supply the new value of that parameter.DPSETIβ called with the name of an internal parameter of type INTEGER or REAL and an integer expression that is to become the new value of that parameter.DPSETRβ called with the name of an internal parameter of type INTEGER or REAL and a real expression that is to become the new value of that parameter.DPSMTHβ called to create a smooth curve passing through a sequence of points and then to interpolate points along that smoothed curve and pass them on toDPDRAW.DPVECTβ does a "pen-down" move to the next in a sequence of points defining a curve.
π¦ C-BINDING SYNOPSIS π¦
#include <ncarg/ncargC.h>
c_dpcurv
c_dpdraw
c_dpfrst
c_dpgetc
c_dpgeti
c_dpgetr
c_dplast
c_dpline
c_dpsetc
c_dpseti
c_dpsetr
c_dpsmth
c_dpvect
π ACCESS π
To use the Dashpack C or Fortran routines, load the NCAR Graphics libraries ncarg, ncarg_gks, and ncarg_c, preferably in that order.
β¨ MESSAGES β¨
When error conditions are detected, the support routine SETER is called. By default, SETER writes a message to the standard error file (as defined by I1MACH(4)) and then terminates execution. It is possible to put SETER into recovery mode and regain control after a recoverable error (which includes all of the possible errors).
The possible error messages are listed below. All errors are recoverable in the sense that a user program which has called ENTSR to set recovery mode will get control back after one of these errors occurs.
DPCURV - UNCLEARED PRIOR ERRORβ so like, whenDPCURVwas called, there was an unrecovered outstanding error just chilling there.DPCURVliterally cannot continue; it forces the error message for that outstanding error to print, then swaps in this one instead. πDPDRAW - IMPLEMENTATION ERROR - SEE SPECIALISTβ an internal oopsie happened, which means DASHPACK wasn't installed correctly. Go see a specialist, bestie. π«DPDRAW - UNCLEARED PRIOR ERRORβ at the timeDPDRAWwas called, there was an unrecovered outstanding error just sitting there.DPDRAWcan't deal, so it forces the error message for that outstanding error to print and then substitutes this one for it. πDPFRST - UNCLEARED PRIOR ERRORβ whenDPFRSTwas called, there was an unrecovered outstanding error already in the chat.DPFRSTcannot continue; it forces the error message for that outstanding error to print and then swaps in this one instead. πDPGETC - PARAMETER NAME NOT KNOWN - Xβ the first argument in a call toDPGETCisn't one of the legal internal parameter names of DASHPACK. TheXis literally the value of the offending first argument. π©DPGETC - PARAMETER NAME TOO SHORT - Xβ the given parameter name is only one or two characters long. All DASHPACK parameter names are at least three characters long, so something is wrong.Xis the value of the offending first argument. π§DPGETC - UNCLEARED PRIOR ERRORβ whenDPGETCwas called, there was an unrecovered outstanding error just vibing.DPGETCcannot continue; it forces the error message for that outstanding error to print and then substitutes this one for it. π΅βπ«DPGETI - UNCLEARED PRIOR ERRORβ at the timeDPGETIwas called, there was an unrecovered outstanding error.DPGETIcan't continue; it forces the error message for that outstanding error to print and then swaps in this one instead. πDPGETR - PARAMETER NAME NOT KNOWN - Xβ the first argument in a call toDPGETRisn't one of the legal internal parameter names of DASHPACK.Xis the value of the offending first argument. π«DPGETR - PARAMETER NAME TOO SHORT - Xβ the given parameter name is only one or two characters long. All DASHPACK parameter names are at least three characters long, so there's something wrong.Xis the value of the offending first argument. πDPGETR - UNCLEARED PRIOR ERRORβ whenDPGETRwas called, there was an unrecovered outstanding error.DPGETRcannot continue; it forces the error message for that outstanding error to print and then substitutes this one for it. π€DPLAST - UNCLEARED PRIOR ERRORβ at the timeDPLASTwas called, there was an unrecovered outstanding error just hanging out.DPLASTcan't continue; it forces the error message for that outstanding error to print and then swaps in this one instead. π«£DPLINE - UNCLEARED PRIOR ERRORβ whenDPLINEwas called, there was an unrecovered outstanding error.DPLINEcannot continue; it forces the error message for that outstanding error to print and then substitutes this one for it. πDPSETC - PARAMETER NAME NOT KNOWN - Xβ the first argument in a call toDPSETCisn't one of the legal internal parameter names of DASHPACK.Xis the value of the offending first argument. βDPSETC - PARAMETER NAME TOO SHORT - Xβ the given parameter name is only one or two characters long. All DASHPACK parameter names are at least three characters long, so something is off.Xis the value of the offending first argument. πDPSETC - UNCLEARED PRIOR ERRORβ at the timeDPSETCwas called, there was an unrecovered outstanding error.DPSETCcan't continue; it forces the error message for that outstanding error to print and then substitutes this one for it. π©DPSETI - UNCLEARED PRIOR ERRORβ whenDPSETIwas called, there was an unrecovered outstanding error.DPSETIcannot continue; it forces the error message for that outstanding error to print and then swaps in this one instead. π«DPSETR - PARAMETER NAME NOT KNOWN - Xβ the first argument in a call toDPSETRisn't one of the legal internal parameter names of DASHPACK.Xis the value of the offending first argument. πDPSETR - PARAMETER NAME TOO SHORT - Xβ the given parameter name is only one or two characters long. All DASHPACK parameter names are at least three characters long, so there's something wrong.Xis the value of the offending first argument. πDPSETR - UNCLEARED PRIOR ERRORβ at the timeDPSETRwas called, there was an unrecovered outstanding error.DPSETRcannot continue; it forces the error message for that outstanding error to print and then substitutes this one for it. π΅DPSMTH - UNCLEARED PRIOR ERRORβ whenDPSMTHwas called, there was an unrecovered outstanding error.DPSMTHcan't continue; it forces the error message for that outstanding error to print and then swaps in this one instead. π«₯DPVECT - UNCLEARED PRIOR ERRORβ at the timeDPVECTwas called, there was an unrecovered outstanding error.DPVECTcannot continue; it forces the error message for that outstanding error to print and then substitutes this one for it. π΅βπ«
π SEE ALSO π
- Online:
dashpack_params,dpcurv,dpdraw,dpfrst,dpgetc,dpgeti,dpgetr,dplast,dpline,dpsetc,dpseti,dpsetr,dpsmth,dpvect,ncarg_cbind. - Hardcopy: None.
π 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 vibe! This page is from the UNIX manual, March 1995, and it's Dashpack(3NCARG). Stay iconic! πβ¨
π¦ where this page comes from
- epel 9: ncl-devel 6.6.2-59.el9 Β· LicenseRef-Callaway-BSD
- fedora 43: ncl-devel 6.6.2-58.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: ncl-devel 6.6.2-62.fc44 Β· LicenseRef-Callaway-BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms