section of routines in style.i

functions in style.i -

 
 
 
GaAxisStyle


 GaAxisStyle  
 
struct GaAxisStyle {  
  double nMajor, nMinor, logAdjMajor, logAdjMinor;  
  int nDigits, gridLevel;  
  int flags;    /* 0x001 ticks on lower edge  
                   0x002 ticks on upper edge  
                   0x004 ticks in center  
                   0x008 inward ticks  
                   0x010 outward ticks  
                   0x020 labels on lower edge  
                   0x040 labels on upper edge  
                   0x080 full grid lines  
                   0x100 origin grid line   */  
  double tickOff, labelOff;  /* offsets in NDC from the edge of the  
                                viewport to the ticks or labels */  
  double tickLen(5);         /* tick lengths in NDC */  
  GpLineAttribs tickStyle, gridStyle;  
  GpTextAttribs textStyle;   /* alignment ignored, set correctly */  
  double xOver, yOver;       /* position for overflow label */  
}  
 
 
 
GaTickStyle


 GaTickStyle  
 
struct GaTickStyle {  
  GaAxisStyle horiz, vert;  
  int frame;  
  GpLineAttribs frameStyle;  
}  
 
 
 
GeLegendBox


 GeLegendBox  
 
struct GeLegendBox {  
  double x, y;              /* NDC location of this legend box */  
  double dx, dy;            /* if non-zero, offset to 2nd column */  
  GpTextAttribs textStyle;  /* font, size, etc. of these legends */  
  int nchars, nlines;       /* max number of characters per line, lines */  
  int nwrap;                /* max number of lines to wrap long legends */  
}  
 
 
 
get_style


             get_style, landscape, systems, legends, clegends  
 
     get the detailed style of the current drawing.  The arguments  
     are all outputs:  
     landscape: 1 if drawing is landscape orientation, 0 if portrait  
     system:    an array of GfakeSystem struct instances, one per  
                coordinate system in this drawing (ordinarily just one).  
     legends:   a GeLegendBox structure instance describing the layout  
                of the plot legends  
     clegends:  a GeLegendBox structure instance describing the layout  
                of the contour legends  
     See the help for the GeLegendBox and GpTextAttribs structs for  
     the details of the legends and clegends arguments.  Basically,  
     you can adjust the location of the legends on the page, the  
     font and height of the characters used to render legends, and  
     whether the legends are split into two columns.  
     The coordinate systems are the systems accessible via the  
     plsys command.  The index of the system in the system array is  
     the index you use to switch to it in the plsys command.  Simple  
     styles have only one coordinate system, and you should carefully  
     consider whether you should design a graphic style with multiple  
     coordinate systems -- most likely, you can do a better job by  
     combining several separate Yorick pictures with some sort of  
     page layout program, rather than trying to do this work within  
     Yorick itself.  
     See the help for the GfakeSystem struct for complete details of  
     what you can adjust.  The most interesting features you can  
     control are the location and aspect ratio of the viewport, and  
     the details of the axis ticks and labels.  The gridxy function  
     provides a simpler interface for fiddling with ticks and labels  
     if that is all you need.  The system.viewport member is the  
     [xmin,xmax,ymin,ymax] of the rectangle on the page where your  
     plots will appear, expressed in NDC coordinates (0.0013 NDC units  
     equals one point, and there are 72.27 points per inch, and 2.54  
     cm per inch; the NDC origin is always at the lower left hand  
     corner of the paper, with x increasing leftward and y increasing  
     upward).  If you change the size of the viewport, you will also  
     need to change the parameters of the tick-generating model; like  
     other problems in typography and page layout, this is harder  
     than you might think.  
SEE ALSO: set_style,   read_style,   write_style  
 
 
 
GfakeSystem


 GfakeSystem  
 
struct GfakeSystem {  
  double viewport(4);    /* [xmin,xmax,ymin,ymax] in NDC coordinates */  
  GaTickStyle ticks;     /* tick style for this coordinate system */  
  string legend;         /* e.g.- "System 0" or "System 1" */  
}  
 
 
 
GpLineAttribs


 GpLineAttribs  
 
struct GpLineAttribs {  
  long color;     /* 255=bg 254=fg 253=b 252=w ...=rgb ...=cmy */  
  int type;       /* line types: 0=none 1=solid 2=- 3=. 4=-. 5=-..  */  
  double width;   /* 1.0 is normal width of a line (1/2 point) */  
}  
 
 
 
GpTextAttribs


 GpTextAttribs  
 
struct GpTextAttribs {  
  long color;       /* 255=bg 254=fg 253=b 252=w ...=rgb ...=cmy */  
  int font;         /* text font  
                       fonts: 0=courier 4=times 8=helvetica 12=symbol  
                             16=newcentury  
                              or with 1 for bold, 2 for italic */  
  double height;    /* character height in NDC, default 0.0156 (12pt)  
                       UNLIKE GKS, GIST font sizes are always specified  
                       in NDC.  This drastically simplifies coding for  
                       devices like X windows, which must load a font  
                       at each size.  It also conforms better with  
                       a Mac-like user interface in which font size  
                       in points is selected by the user.  */  
  int orient;          /* text orientation: 0=right 1=left 2=up 3=down  */  
  int alignH, alignV;  /* text alignments:  
                          alignH: 0=normal 1=left 2=center 3=right  
                          alignV: 0=normal 1=top 2=cap 3=half 4=base 5=bot */  
  int opaque;  
}  
 
 
 
read_style


             read_style, file, landscape, systems, legends, clegends  
 
     read a Gist style sheet (.gs file), and return the data  
     structures as described in the get_style function.  The FILE  
     can be a filename or a text file stream.  
SEE ALSO: get_style,   set_style,   write_style  
 
 
 
set_style


             set_style, landscape, systems, legends, clegends  
 
     set the detailed style of the current drawing.  The arguments  
     are all inputs, having the same meanings as for get_style (which  
     see).  All arguments are required, so you may need to call  
     get_style as a starting point, if you only want to make a few  
     changes.  See the Y_SITE/g/work.gs and the other .gs files for  
     examples of reasonable values to choose.  
     Calling set_style destroys anything that was plotted in the  
     window, like the style= keyword of the window command.  
SEE ALSO: get_style,   read_style,   write_style  
 
 
 
write_style


             write_style, file, landscape, systems, legends, clegends  
 
     write a Gist style sheet (.gs file), using the data structures  
     as described in the get_style function.  The FILE can be a  
     filename or a text file stream.  
SEE ALSO: get_style,   set_style,   read_style