PLplot
5.11.0
|
Go to the source code of this file.
Macros | |
#define | __PLSYM_H__ |
#define | PLMAXSTR 300 |
#define | STLEN 250 |
Functions | |
int | hershey2unicode (int in) |
static void | pldeco (short int **sym, PLINT *length, const char *text) |
static void | plchar (signed char *xygrid, PLFLT *xform, PLINT base, PLINT oline, PLINT uline, PLINT refx, PLINT refy, PLFLT scale, PLFLT xpmm, PLFLT ypmm, PLFLT *p_xorg, PLFLT *p_yorg, PLFLT *p_width) |
static PLINT | plcvec (PLINT ch, signed char **xygr) |
static void | plhrsh2 (PLINT ch, PLINT x, PLINT y) |
void | c_plstring (PLINT n, const PLFLT *x, const PLFLT *y, const char *string) |
void | c_plsym (PLINT n, const PLFLT *x, const PLFLT *y, PLINT code) |
void | c_plpoin (PLINT n, const PLFLT *x, const PLFLT *y, PLINT code) |
void | c_plpoin3 (PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, PLINT code) |
void | c_plstring3 (PLINT n, const PLFLT *x, const PLFLT *y, const PLFLT *z, const char *string) |
void | plhrsh (PLINT ch, PLINT x, PLINT y) |
void | c_pllab (const char *xlabel, const char *ylabel, const char *tlabel) |
void | c_plmtex (const char *side, PLFLT disp, PLFLT pos, PLFLT just, const char *text) |
void | c_plptex (PLFLT wx, PLFLT wy, PLFLT dx, PLFLT dy, PLFLT just, const char *text) |
void | plstr (PLINT base, PLFLT *xform, PLINT refx, PLINT refy, const char *string) |
PLFLT | plstrl (const char *string) |
PLINT | plP_strpos (const char *str, int chr) |
PLINT | plP_stindex (const char *str1, const char *str2) |
PLBOOL | plP_stsearch (const char *str, int chr) |
void | plP_script_scale (PLBOOL ifupper, PLINT *level, PLFLT *old_scale, PLFLT *scale, PLFLT *old_offset, PLFLT *offset) |
void | c_plfont (PLINT ifont) |
void | plfntld (PLINT fnt) |
void | plfontrel (void) |
int | plhershey2unicode (int in) |
const char * | plP_FCI2FontName (PLUNICODE fci, const FCI_to_FontName_Table lookup[], const int nlookup) |
void | c_plmtex3 (const char *side, PLFLT disp, PLFLT pos, PLFLT just, const char *text) |
void | c_plptex3 (PLFLT wx, PLFLT wy, PLFLT wz, PLFLT dx, PLFLT dy, PLFLT dz, PLFLT sx, PLFLT sy, PLFLT sz, PLFLT just, const char *text) |
void | c_plsfont (PLINT family, PLINT style, PLINT weight) |
void | c_plgfont (PLINT *p_family, PLINT *p_style, PLINT *p_weight) |
Variables | |
static short int * | fntlkup |
static short int * | fntindx |
static signed char * | fntbffr |
static short int | numberfonts |
static short int | numberchars |
static short int | indxleng |
static short | fontloaded = 0 |
static const char | font_types [] = "nris" |
static short | symbol_buffer [PLMAXSTR] |
static signed char | xygrid [STLEN] |
Point-, symbol-, and string-plotting routines.
Definition in file plsym.c.
void c_pllab | ( | const char * | xlabel, |
const char * | ylabel, | ||
const char * | tlabel | ||
) |
Plot a glyph at the specified points. (This function is largely superseded by plstring which gives access to many[!] more glyphs.) code=-1 means try to just draw a point. Right now it's just a move and a draw at the same place. Not ideal, since a sufficiently intelligent output device may optimize it away, or there may be faster ways of doing it. This is OK for now, though, and offers a 4X speedup over drawing a Hershey font "point" (which is actually diamond shaped and and therefore takes 4 strokes to draw). If 0 < code < 32, then a useful (but small subset) of Hershey symbols is plotted. If 32 <= code <= 127 the corresponding printable ASCII character is plotted.
n | Number of points in x and y arrays. |
x | Pointer to an array with X coordinates of points. |
y | Pointer to an array with Y coordinates of points. |
code | Hershey symbol code (in "ascii-indexed" form with -1 <= code <= 127) corresponding to a glyph to be plotted at each of the n points. |
Plot a glyph at the specified 3D points. (This function is largely superseded by plstring3 which gives access to many[!] more glyphs.) Set up the call to this function similar to what is done for plline3. code=-1 means try to just draw a point. Right now it's just a move and a draw at the same place. Not ideal, since a sufficiently intelligent output device may optimize it away, or there may be faster ways of doing it. This is OK for now, though, and offers a 4X speedup over drawing a Hershey font "point" (which is actually diamond shaped and therefore takes 4 strokes to draw). If 0 < code < 32, then a useful (but small subset) of Hershey symbols is plotted. If 32 <= code <= 127 the corresponding printable ASCII character is plotted.
n | Number of points in x, y, and z arrays. |
x | Pointer to an array with X coordinates of points. |
y | Pointer to an array with Y coordinates of points. |
z | Pointer to an array with Z coordinates of points. |
code | Hershey symbol code (in "ascii-indexed" form with -1 <= code <= 127) corresponding to a glyph to be plotted at each of the n points. |
Plot a glyph at the specified points. (This function largely supersedes plpoin and plsym because many[!] more glyphs are accessible with plstring.) The glyph is specified with a PLplot user string. Note that the user string is not actually limited to one glyph so it is possible (but not normally useful) to plot more than one glyph at the specified points with this function. As with plmtex and plptex, the user string can contain FCI escapes to determine the font, UTF-8 code to determine the glyph or else PLplot escapes for Hershey or unicode text to determine the glyph.
n | Number of points in x and y arrays. |
x | Array of X coordinates of points. |
y | Array of Y coordinates of points. |
string | PLplot user string corresponding to the glyph to be plotted at each of the n points. |
void c_plstring3 | ( | PLINT | n, |
const PLFLT * | x, | ||
const PLFLT * | y, | ||
const PLFLT * | z, | ||
const char * | string | ||
) |
Plot a glyph at the specified 3D points. (This function largely supersedes plpoin3 because many[!] more glyphs are accessible with plstring3). Set up the call to this function similar to what is done for plline3. The glyph is specified with a PLplot user string. Note that the user string is not actually limited to one glyph so it is possible (but not normally useful) to plot more than one glyph at the specified points with this function. As with plmtex and plptex, the user string can contain FCI escapes to determine the font, UTF-8 code to determine the glyph or else PLplot escapes for Hershey or unicode text to determine the glyph.
n | Number of points in x, y, and z arrays. |
x | Array of X coordinates of points. |
y | Array of Y coordinates of points. |
z | Array of Z coordinates of points. |
string | PLplot user string corresponding to the glyph to be plotted at each of the n points. |
Plot a glyph at the specified points. (This function is largely superseded by plstring which gives access to many[!] more glyphs.)
n | Number of points in x and y arrays. |
x | Pointer to an array with X coordinates of points. |
y | Pointer to an array with Y coordinates of points. |
code | Hershey symbol code corresponding to a glyph to be plotted at each of the n points. |
int hershey2unicode | ( | int | in | ) |
const char* plP_FCI2FontName | ( | PLUNICODE | fci, |
const FCI_to_FontName_Table | lookup[], | ||
const int | nlookup | ||
) |
void plP_script_scale | ( | PLBOOL | ifupper, |
PLINT * | level, | ||
PLFLT * | old_scale, | ||
PLFLT * | scale, | ||
PLFLT * | old_offset, | ||
PLFLT * | offset | ||
) |
Calculate scale of font size and scale of magnitude of vertical offset associated with superscripts and subscripts. Notes on arguments: ifupper must be either TRUE or FALSE on every call to plP_script_scale. The contents of the location pointed to by the level pointer must be zero on the first call to plP_script_scale, but not modified externally from then on. The contents of the locations pointed to by all other pointer arguments are initialized internally, and should not be modified externally.
ifupper | Value which is TRUE if superscripting, i.e., if incrementing the previous level, and FALSE if subscripting, i.e., decrementing the previous level. |
level | Pointer to a location which contains the value of the superscript/subscript level. That value is 0, +-1, +-2, etc., for no superscript/subscript, the first level of superscript/subscript, the second level of superscript/subscript, etc. Before the call the value is the old level, and after the call the value will be incremented (ifupper TRUE) or decremented (ifupper FALSE) from the previous value. |
old_scale | A pointer to a location that contains after the call the old font size scale value. |
scale | A pointer to a location that contains after the call the font size scale value. This value is 0.75^{|level|} where |level| is the magnitude of the value of the superscript/subscript level after the call. |
old_offset | A pointer to a location that contains after the call the old value of the magnitude of the superscript/subscript offset. |
offset | A pointer to a location that contains after the call the value of the magnitude of the superscript/subscript offset which is zero for |level|=0 and sum_{i=1}^{i=|level|} 0.75^{i-1}, otherwise. |