NCARG_GKS_CBIND(3NCARG)
π NCARG_GKS_CBIND β the NCAR Graphics GKS C-binding, explained by your favorite Unix bestie π
okay so. bestie. sit down. we're talking about NCARG_GKS_CBIND, which lives in section 3NCARG of the manual, and it's literally just "how do I use the NCAR Graphics GKS C-binding." that's the whole vibe. let's go β¨
β¨ NAME β¨
NCAR Graphics GKS C-binding β a description of how to use the NCAR Graphics GKS C-binding. yes, the name is the name. iconic behavior honestly π
πΈ SYNOPSIS πΈ
this part is only gonna briefly tell you how to use the NCAR Graphics GKS C-binding, so heads up. if you're planning to go heavy on the GKS C-bindings, you might wanna grab yourself a copy of the American National Standard's "Computer Graphics - Graphical Kernel System (GKS) - Functional Description". and if what you actually want is info on how to use the C-bindings for the NCAR Graphics utilities, go peek at ncarg_cbind(3NCARG) or the man page for whichever NCAR Graphics routine you're into π«Ά
the NCAR Graphics GKS C-binding adheres to the ISO/IEC standard. that's the rule. and only the functions at level 0A have been implemented. also, at the time, not all of those are supported β only the ones that have man pages associated with them are supported. no cap.
here's the list of the currently supported NCAR Graphics GKS C-bindings, and yes we're listing every single one, don't play with me:
gaccum_tran_matrix
gactivate_ws
gcell_array
gclear_ws
gclose_gks
gclose_seg
gclose_ws
gcopy_seg_ws
gcreate_seg
gdeactivate_ws
gdel_seg
gescape
geval_tran_matrix
gfill_area
ginq_asfs
ginq_char_expan
ginq_char_ht
ginq_char_space
ginq_char_up_vec
ginq_clip
ginq_colr_rep
ginq_cur_norm_tran_num
ginq_fill_colr_ind
ginq_fill_int_style
ginq_fill_style_ind
ginq_line_colr_ind
ginq_linetype
ginq_linewidth
ginq_marker_colr_ind
ginq_marker_size
ginq_marker_type
ginq_max_norm_tran_num
ginq_name_open_seg
ginq_norm_tran
ginq_op_st
ginq_set_seg_names
ginq_text_align
ginq_text_colr_ind
ginq_text_font_prec
ginq_text_path
gopen_gks
gopen_ws
gpolyline
gpolymarker
gsel_norm_tran
gset_asfs
gset_char_expan
gset_char_ht
gset_char_space
gset_char_up_vec
gset_clip_ind
gset_colr_rep
gset_fill_colr_ind
gset_fill_int_style
gset_fill_style_ind
gset_line_colr_ind
gset_linetype
gset_linewidth
gset_marker_colr_ind
gset_marker_size
gset_marker_type
gset_seg_tran
gset_text_align
gset_text_colr_ind
gset_text_font_prec
gset_text_path
gset_vp
gset_win
gtext
gupd_ws
please go see the man page for any one of these if you want more info on that particular function. and in the future, as higher level GKS Fortran functions get implemented, there may be C-bindings created for them as well. we love a future teaser π
now this next bit is important, so listen up: since the NCAR Graphics GKS C-binding adheres to the standard, the names for the C-bindings are not like the Fortran names. instead, the function names are more descriptive β like gset_fill_colr_ind, which corresponds to the Fortran GKS routine GSFACI. π
if you know the name of the Fortran GKS routine and you need the C-binding name, just look at the man page for the Fortran routine to get the name of the C-binding routine. easy. iykyk.
π¦ ARGUMENT LISTS π¦
the argument list of each GKS C-binding closely corresponds with the argument list of the Fortran routine, but in many cases the arguments are represented in the form of a C structure. those structures are defined in the include file <ncarg/gks.h>. yes, that exact file. don't improvise π
π§ FUNCTION PROTOTYPES π§
the GKS C-bindings are intended to be ANSI C compliant. to get the correct function prototypes, include <ncarg/gks.h> in your C program. that's it, that's the tip, go forth β¨
π COMPILING YOUR PROGRAM π
to compile your NCAR Graphics C program with the GKS C-bindings, use the application ncargcc. ncargcc will take care of loading in the necessary C/Fortran interface libraries as well as the NCAR Graphics C and Fortran libraries. she does it all, main character energy fr.
you will either need to set the NCARG_ROOT environment variable, or the NCARG_BIN, NCARG_LIB, and NCARG_INCLUDE environment variables, in order to run ncargcc. see man ncargintro for more information.
if you don't wish to use ncargcc, then you can just run it with no arguments to see what the necessary libraries are, and then put this in your Makefile or whatever else you are using to compile your program. DIY queen behavior π
π EXAMPLES π
an example of a C program that calls some of the NCAR Graphics GKS C-bindings has been provided π«Ά to copy this C program into your directory, and then compile, link, and run it, type:
ncargex c_gtxpac
run it, bestie. you'll eat, i promise π
π₯ SEE ALSO π₯
- Online:
ncarg_cbind(3NCARG),ncargex(1NCARG),ncargintro(5NCARG). - Hardcopy: NCAR Graphics Fundamentals, UNIX Version User's Guide for NCAR GKS-0A Graphics
π COPYRIGHT π
Copyright (C) 1987-2002 University Corporation for Atmospheric Research
The use of this Software is governed by a License Agreement.
and that's the whole page, periodt π
this one came straight out of the NCAR Graphics crew back in February 1993, and it's part of the 3NCARG manual section. go forth and bind those GKS functions, you absolute icon πβ¨π
π¦ 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