Polymarker Output


Discussed here is the polymarker output primitive GPM and the functions that are used to set polymarker attributes and retrieve current attribute settings.

The Polymarker Output Primitive

The polymarker output primitive GPM causes N markers to be drawn at the locations specified by the coordinate pairs (X(I),Y(I)) for I=1,N. The markers can be either a dot, a plus sign, an asterisk (the default), a circle, or a cross.
-------------------------------------------------
          Argument | Type    |  Mode  | Dimension
-------------------------------------------------
CALL GPM  (N,      | Integer |  Input |
           X,      | Real    |  Input |   N
           Y)      | Real    |  Input |   N
-------------------------------------------------
N
The number of markers to be drawn. (N > 0)
X
An array of dimension N containing the X coordinates of the N markers to be drawn, in world coordinates.
Y
An array of dimension N. The Y coordinates of the N markers to be drawn, in world coordinates.
Defaults:
none
Errors:
5, 100
By default, the polymarker type is an asterisk. To select other polymarker types and attributes, see Setting Polymarker Attributes. All standardized polymarkers are symmetric and will be centered on the specified coordinates.
--------------------------------------------------------------------------
C Synopsis

#include <ncarg/gks.h>

void gpolymarker(
                 const Gpoint_list  *point_list  /*  list of points  */
);
--------------------------------------------------------------------------

Figure 7 - Examples of polymarkers

Setting Polymarker Output Attributes


You can set polymarker types and sizes using GSMK and GSMKSC, respectively.

Set Polymarker Type

-------------------------------------------------
           Argument | Type    |  Mode | Dimension
-------------------------------------------------
CALL GSMK  (MTYPE)  | Integer | Input |
-------------------------------------------------
MTYPE
Selects the type of marker to be drawn. Options are:
< 0 - implementation dependent (not used in NCAR GKS)
1 - . (dot)
2 - + (plus)
3 - * (asterisk)
4 - o (circle)
5 - X (cross)
>= 6 - reserved for registration or future standardization
Default:
The default polymarker is an asterisk.
Errors:
8, 69
--------------------------------------------------------------------
C Synopsis

#include <ncarg/gks.h>

void gset_marker_type(
                      Gint  marker_type  /*  marker type  */
);
--------------------------------------------------------------------

Set Polymarker Size Scale Factor

-------------------------------------------------
             Argument | Type | Mode  |  Dimension
-------------------------------------------------
CALL GSMKSC  (MSZSF)  | Real | Input |
-------------------------------------------------
MSZSF
A scale factor to control the size of the marker. It must be greater than or equal to 0.
Default:
1.0
Errors:
8
The GKS standard requires that marker type 1 always be displayed as the smallest possible dot. For this reason a dot marker will not be scaled, regardless of the value of MSZSF. To get filled dots of any size and color, use the NGDOTS utility.
--------------------------------------------------------------------------
C Synopsis

#include <ncarg/gks.h>

void gset_marker_size(
                  Gdouble  marker_size  /*  marker size scale factor  */
);
--------------------------------------------------------------------------

Polymarker Inquiry Functions


Get the Polymarker Type

--------------------------------------------------
           Argument | Type    | Mode   | Dimension
--------------------------------------------------
CALL GQMK  (ERRIND, | Integer | Output |
            MTYPE)  | Integer | Output |
--------------------------------------------------
ERRIND
Error flag. Gives an integer error number from the errors list in in Appendix D, or a 0 if no error occurred.
MTYPE
The polymarker type as set by GSMK.
Errors:
8
-------------------------------------------------------------------------
C Synopsis

#include <ncarg/gks.h>

void ginq_marker_type(
                      Gint  *err_ind,     /*  error indicator      */
                      Gint  *marker_type  /*  current marker type  */
);
-------------------------------------------------------------------------

Get the Polymarker Size Scale Factor

----------------------------------------------------
             Argument | Type    | Mode   | Dimension
----------------------------------------------------
CALL GQMKSC  (ERRIND, | Integer | Output |
              MSZSF)  | Real    | Output |
----------------------------------------------------
ERRIND
Error flag. Gives an integer error number from the errors list in in Appendix D, or a 0 if no error occurred.
MSZSF
Gives the marker size scale factor as set by GSMKSC.
Errors:
8
----------------------------------------------------------------------------
C Synopsis

#include <ncarg/gks.h>

void ginq_marker_size(
                      Gint  *err_ind,     /*  error indicator           */
                      Gint  *marker_size  /*  marker size scale factor  */
);
----------------------------------------------------------------------------

Links: GKS Index, GKS Home