AdvancedDCL

This library is wrapper of RubyDCL and it is more useful with Ruby than RubyDCL. One of differences between RubyDCL and AdvancedDCL is a way of handling parameters. In this library, it is possible to set parameters as a keyword argument of Ruby methods. This setting is temporary setting. If you need more explanation, refer About setting parameters, please.

DCL online manual page

<URL:http://www.gfd-dennou.org/arch/dcl/dcl-f77doc/rc1/ >

Modules in AdvancedDCL are follows. About methods in each module, please refer Modules of this library.

The way of using this library

It is assumed that this library is installed. (A way to install is written in INSTALL.)

If you use this library, you type in programs as follows.

require 'advanceddcl'

basics of this library

Device and Frame

To draw a graphic, you will first need a device such as a display or printer. The process of preparing the device is called "open" a device, and to "close" the device means to end the graphic processing. All graphics must be drawn between this "open" and "close" process. In the DCL, a single device can be opened at one time. Two or more devices cannot be opened simultaneously, but it is possible to select one device from several while open.

The graphics drawn on the device may extend over several pages. In the DCL, the term "<b>frames</b>" are used instead of the pages. This is because the concept of pages do not exists on some devices (for example, in devices that with outputs on long sheets like scrolls), or there are cases where several frames are allotted to a single physical page, as explained in a later section, and a frame needs to be distinguished from a physical page.

Programs that use graphics follow the flow below.

Dev.open("X")           ! Open device number "X"
Frame.new               ! Prepare frame
. . . . . . . .         ! Graphics program for the first page
Frame.new               ! New page
. . . . . . . .         ! Graphics program for second page    
   . 
   . 
   . 
Dev.close               ! Close device

Coordinate System and Transformation

There are 4 levels to the coordinate systems used in this library. The levels are labeled with symbols, U, V, R, and W, in descending order, and are referred to as the "U-coordinate", "V-coordinate", "R-coordinate", and "W-coordinate", respectively. (See Fig. 1.3) The letters U, V, R, and W are derived from the names of the systems below, and terms such as "U-coordinate" will be used as abbreviations. (These terms may further be shortened to "UC".)

In the explanation of arguments in the reference manual, the coordinates for the U-coordinate is written as (UX,UY), with characters representing the coordinate system. (The normalized rectangular coordinate is called an R-coordinate instead of the N-coordinate based on the rules of FORTRAN concerning floating-point variables.

Relationship Between Coordinate System and Transformation Functions
                   2D coordinate  3D coordinate
User coordinate          UC            UC3
                          |             |
                        (TC)            | normalization transformation
                          |             |
Virtual rectangular      VC------------VC3
     coordinate           |             | perspective transformation
                          |             | 
Regular rectangular      RC-------------
     coordinate           |               workstation transformation
                          |
Device coordinate        WC

The highest-level U-coordinate includes many systems from the normal X-Y coordinate to map projection coordinates. In the V-coordinate, one level below the UC, a rectangular coordinate is defined, one for 2-D and 3-D each, and the various UC systems are transformed to these 2 types. This transformation is called "the normalization transformation".

On the other hand, the W-coordinate, which is the lowest-level system, is a device-specific coordinate, and is different according to device. To unify these coordinate systems, the R-coordinate is defined one level above the WC. All coordinates are transformed to WC via the RC. This transformation is called the "workstation transformation". The RC is a 2-D rectangular coordinate, and the defined range for both the x- and y-axes are [0,1].

The transformation that connects the higher two and lower two levels of coordinate systems, or one from the VC to RC, is called the "perspective transformation". The perspective transformation is, true to its name, a transformation using the perspective representation, and is basically a transformation from the 3-D VC to the 2-D RC. The 2-D VC is first allocated to a 3-D VC before perspective transformation. This 2-D VC can be allotted to an arbitrary plane that is perpendicular to the x-, y-, or the z-axis in the 3-D system. Through this, a 2-D plot may be drawn from an oblique viewpoint.

In the initial state, the perspective transformation from the 2-D VC is an identical transformation, so no special attention is needed in perspective transformation as long as the 2-D coordinate system is treated normally. However, there may be a need to use the perspective transformation later on, so the user is advised to distinguish between the VC and the RC. In other words, "information accompanying the plot" such as axes, should be transformed along with the plot in the perspective transformation, so it should be drawn in the VC. "Information accompanying the page" such as page numbers and values of parameters drawn by SLPACK should be drawn in the RC.

The normalization transformation of map coordinate systems are carried out in two steps: "rotation" and "projection". The intermediate coordinate system (the rotated UC) is called the T-coordinate (Terrestrial coordinate). In the TC, the defined ranges of the x-axis and y-axis are [-180, 180] and [-90, 90], respectively. All maps are transformed according to the definitions for various map projections from this coordinate system. To select an arbitrary longitude as the central longitude, or to make projections on the transverse aspect or the oblique aspect, the coordinate system must be rotated before the projection.

Since the TC is a temporary work coordinate system during the normalization transformation, the user normally does not need be aware of it. However, since <b>clipping of the map coordinates</b> is performed in the TC and not in the UC, one needs to take the TC into consideration during clipping.

2-D Normalization Transformation

Types of Coordinate Systems

The following types of 2-D coordinate systems exist in the UC, and the user can specify one with the number of function. (Functions that return the function number from an abbreviation or name is also available.) Each coordinate system needs different sets of parameters for normalization transformation depending on the type.

The user will prepare the transformation function necessary for the user defined coordinate system.

Map Projections

In the DCL, map projection coordinates are treated as normal U-coordinates. There are many different types of map projections, and a whole book would be needed to explain all of them. Here, we will introduce the fundamentals that you should know for using the DCL library. For details on the map projections, the user is referred to "Map Projections" by Masahichi Nomura. (This book is out of press.)

A map projection is basically a method to "project a spherical surface onto a 2-D plane." Since the Earth is actually nearer to a spheroid and not a perfect sphere, a spheroid must be projected onto a plane in the strict sense of map projection. However, this library supports projection from a spherical surface, and not from a spheroid. The projected object may have 3-D characteristics depending on the projection method used, but keep in mind that the map projection coordinates are only 2-D.

In many map projection methods, geometric techniques are used to project the spherical surface onto a plane, and the methods can be classified into several groups according to the morphology of the plane.

When the axes of these cylinders and cones, or the perpendiculars from the contact in azimuthal projections coincide with the Earth's axis of rotation, the projection is on normal aspect when they are perpendicular to the axis of rotation, the projection is on transverse aspect, and when they are at oblique angles, the projection is on oblique aspect Generally, cylindrical projections are suited for displaying the whole Earth, and conic projections for displaying the mid latitudes.

Since spherical surfaces are projected onto a plane in a map projection, distortions always exist to some extent. Therefore, many projections are designed to preserve either the area or angle. In principle, it is impossible to preserve both area and angle in map projections. The projections are classified into the following groups according to the properties they preserve

the relative area is displayed properly in all parts of the map

the local angle is displayed properly in all parts of the map

the distance is displayed properly along the latitudes, longitudes, and azimuth lines.

The following map projections are supported in this library.

In cartography, Hammer's projection is classified as a variant of the Lambert's azimuthal equal - area projection, but its form and use are more similar to cylindrical projections, so it will be classified under cylindrical projections here, for convenience. All of these projections can be shown on normal, transverse, and oblique aspects.

The satellite view, which is a variant of an orthogonal projection and resembles the Earth as seen from a satellite, is also supported in the library, although it is usually not considered as a normal map projection. A normal orthogonal projection views the Earth from a line at infinity, but the satellite view views the Earth from a finite point.

Parameters for Normalization Transformation

The following are the parameters necessary for normalization transformation of U-coordinate into 2-D V-coordinate . Each parameter can be changed/inquired by Fig module, although utilities are available for setting similar parameters at once.

Viewport (VXMIN, VXMAX, VYMIN, VYMAX)

This set of parameters that specifies the viewport is common for all transformations and is requisite. A viewport is usually a rectangular frame in which the axes are drawn. When clipping is specified, graphics outside the clipping rectangle is not drawn. The coordinates in VC for the lower left-hand and upper right-hand corners are used to specify the viewport.

Window (UXMIN, UXMAX, UYMIN, UYMAX)

This set of parameters is necessary for setting the rectangular linear coordinate. This is specified using the coordinates in UC corresponding to the viewport.

In map projection coordinates, this information is not needed for GRPH1, but the GRPH2 package may inquire about this as "the lat-long range in scope." In this case, the viewport and the window does not usually coincide. These parameters can be changed/inquired with parameter "window" in Fig module.

Similar Transformation Parameters (SIMFAC, VXOFF, VYOFF)

A set of parameters for similar transformation (scaling and origin shift) in a rectangular curvilinear coordinate and map projection transformations, defined by the function MATH1/CTRLIB for rectangular curvilinear coordinates, and MATH1/MAPLIB for map projection coordinates. In GRPH1, the value returned by these functions is multiplied by <tt>SIMFAC</tt> to convert to a value in VC, and is set at the position with the origin shifted parallel from the center of the viewport by (VXOFF, VYOFF). These parameters can be set/inquired with 'simtrans' method in Fig module.

Map Coordinate Rotation Parameters(PLX, PLY, PLROT)

Map projection transformations are always carried out within the longitudinal range of [-180, 180] and latitudinal range of [-90, 90], so to project from an arbitrary viewpoint, the lat-long coordinates must be rotated before the projection. <tt>(PLX, PLY)</tt> specifies the latitude and longitude (UC) for positioning the pole of the projection coordinate (TC), and <tt>PLROT</tt> specifies the angle of rotation of the projection coordinates around the pole.

The relationship between these parameters and the "Euler's angle<tt>( theta , phi , psi )</tt>" used generally to specify the angle of rotation in 3-D is <tt> theta = pi /2-PLY, phi =PLX, psi =PLROT</tt>. (Consult math dictionaries for a definition of the Euler's angle.)

These parameters can be changed/inquired with parameter "mapangle" in Fig module.

The actual procedures are as follows. In the initial state, UC coincides with TC (projection coordinate).

  1. TC is rotated around the north pole by phi . (The meridian at <tt>PLX</tt> longitude is set as the central meridian.)
  2. The north pole of TC is rotated in the direction of the central meridian by <tt> theta </tt>. (The point at long. and lat.<tt>(PLX, PLY)</tt> is considered as the north pole of TC.)
  3. The projection is rotated around the north pole of the TC by psi . (The angle between the meridian at longitude <tt>PLX</tt> and the central meridian of TC is <tt>PLROT</tt>.)

The transformation from TC to VC is determined by the similar transformation parameters above. The value of TC projected onto the origin of VC depends on the type of map projection.

Projection          TC projected onto origin

The value of TC projected onto the origin corresponds to the case when the Euler's angle is <tt>(0,0,0)</tt>, or when (<tt>PLX,PLY,PLROT)=( lambda ,90.,0)</tt>.

To set the meridian at <tt> lambda </tt> as the central meridian in a normal cylindrical or a conic projection (on normal aspect), let (<tt>PLX,PLY)=( lambda ,90.,0)</tt>.

To draw a map with long. and lat. of <tt>( lambda , phi )</tt> at the center in an azimuthal projection, let (<tt>PLX,PLY)=( lambda , phi )</tt>, and specify <tt>PLROT</tt> as required. When <tt>PLROT=0</tt>, the south pole is always below the origin.

In a cylindrical projection on the traverse aspect, specify a point on the Equator as <tt>(PLX,PLY)</tt>. When <tt>PLROT=0</tt>&nbsp;, the south pole of UC is projected onto the central meridian. For example, if you wish to present the Arctic Ocean, the Atlantic Ocean, and the Southern Ocean as a continuous body with the traverse aspect, let <tt>(PLX, PLY, PLROT) = (60.,0.,-90.)</tt>.

Standard Latitude (STLAT1, STLAT2)

In the conic projection, the standard latitude is necessary besides the above parameters. Since the Lambert's conformal conical projection has two standard parallels, <tt>STLAT2</tt> also needs to be specified. In all other conic projections, only <tt>STLAT1 </tt> is used.

These parameters can be inquired/changed with Fig module.

Radius of Satellite Orbit(RSAT)

Originally, the orthographic projection views the Earth from line of infinity. But a projection that view the Earth from a satellite at a finite point is also available as option (Satellite View). To select this option in the orthographic projection, specify <tt>RSAT</tt> to a value larger than 1. <tt>RSAT</tt> is the "radius of the satellite orbit" when 1 is the radius of the Earth.

This parameter can be inquired/changed with Fig module.

Settings of the U-Coordinate System

Before drawing graphics in a U-coordinate, the <tt>Frame.new</tt> must be called and the parameters that determine the transformation functions must also be specified. The parameters that must be specified depends on the coordinate system, but the main parameters are all handled by Fig module.

To set the parameters for a transformation function, the following coding is performed after <tt>Frame.new</tt>.

In conic projections, the latitude <tt>(STLAT1, STLAT2)</tt> of the standard parallel must be specified with <tt>SGRSET</tt> besides the above.

These parameters can be specified in any order. A Function is also available which returns the number of transformation function when inquired using the function name or abbreviation.

3-D Normalization Transformation

Types of Coordinate Systems

The following types of coordinates exist as user-defined coordinate systems (UC), and the user selects one by specifying the function number.

Number

  1. Rectangular Coordinate
  2. Cylindrical Coordinate
  3. Spherical Coordinate

In contrast to 2-D coordinate systems, logarithmic axes are specified in 3-D systems with the log switch (see later section) and not by the function number.

Parameters for 3-D Normalization Transformation

The following parameters are necessary for normalization transformation of the 3-D U-coordinate to the 3-D V-coordinate. These can be set/inquired separately using Fig module.

Viewport (VXMIN3, VXMAX3, VYMIN3, VYMAX3, VZMIN3, VZMAX3)

A set of parameters necessary for transforming rectangular linear coordinate (<tt>ITR=1</tt>), and is set together with the window parameters. Unlike the viewport in 2-D, it has no connection to the clipping range. These parameters can be changed/inquired with parameter "viewport3d" in Fig module.

Window (UXMIN3, UXMAX3, UYMIN3, UYMAX3, UZMIN3, UZMAX3)

When <tt>ITR=1</tt>, the coordinate values corresponding to the viewport is specified with the values in UC. These parameters can be changed/inquired with parameter "window3d" in Fig module.

Log Switch (LXLOG3, LYLOG3, LZLOG3)

When <tt>ITR=1</tt>, set <tt>.TRUE.</tt> to make both axes presented in log.

These parameters can be changed/inquired with parameter "log3d" in Fig module.

Similar Transformation Parameters (SIMFAC3, VXORG3, VYORG3, VZORG3)

A set of parameters for similar transformation (scaling/origin shift) specified in the case of cylindrical and spherical coordinates. The origin is set as (VXORG3, VYORG3, VZORG3). These parameters can be changed/inquired with parameter "origin" in Fig module.

Setings for Coordinate Systems

To draw graphics in a 3-D UC, as in the 2-D coordinate system, the parameters that determine transformation function must be specified after calling <tt>Frame.new</tt> but before starting to draw graphics. The parameters for 3-D systems are independent of those for the 2-D system.

The main parameters are all handled by Fig module.

but since it is cumbersome to set the parameters for transformation function individually, a routine is available for setting the parameters at once, which is usually used. To set transformation parameters, the following coding is performed after <tt>Frame.new</tt>.

Perspective Transformation

Perspective transformation produces perspective by viewing the 3-D space from an arbitrary eye point. In the DCL library, it refers to the transformation from a 3-D VC to 2-D RC.

Generally, parallel lines in 3-D space projected onto a 2-D plane are not parallel. If the eye point is placed at the line of infinity, parallel lines will be projected as parallel lines, but graphics projected in such a manner seem unnatural.

To perform perspective transformation, the&nbsp; <b>"eye point"</b> and the <b>"center of focus"</b> must be set. The eye point is the position from which the 3-D space is viewed, and can be thought of as the position of the camera lens. The center of focus, on the other hand, is not the focus on the film inside the camera, but is the point being viewed from the eye point. The line connecting the eye point and the center of focus is the <b>"line of sight"</b> .

With the perspective transformation, a point in a 3-D graphic is projected onto a point on a plane where the line connecting the point in 3-D space and the eye point intersects with the <b>"plane of projection"</b>. In the DCL, the plane of projection is the plane passing through the center of focus and perpendicular to the line of sight.

In the case of 2-D coordinate systems, perspective transformation can be made by allocating the 2-D VC to a plane in a 3-D VC. The plane onto which the 2-D plane can be allocated is one which is perpendicular to either the X-, Y-, or the Z-axis, and cannot be allocated to an oblique plane. (To view the plane from an oblique angle, move the eye point.)

Transformation Parameters

Eye point (XEYE3, YEYE3, ZEYE3)

An eye point in 3-D space. Think of holding a camera in this position.

Center of Focus (XOBJ3, YOBJ3, ZOBJ3)

The point at which the line of sight is aimed in 3-D space. Think of it as the position of the subject of the photograph. The plane perpendicular to the line of sight (line connecting the eye point and center of focus) and passing through the center of focus is the plane of projection. In other words, point (X, Y, Z) in 3-D space is projected onto a point where the line connecting the point in 3-D space and the eye point intersects with the plane of projection.

Angle of View (ANGLE3)

The length of the line projected onto the plane at this angle from the eye point is the unit length in a normalized rectangular coordinate system.

Tilt (TILT3)

Inclination of the Z-axis. Equivalent to the tilt around the optical axis for camera. When this angle is 0, the Z-axis in 3-D space becomes parallel to the Y-axis in s normalized rectangular coordinate system. When the line of sight is parallel to the Z-axis, the Y-axis becomes the standard line.

Offset (XOFF3, YOFF3)

The position of the center of focus projected onto a normalized rectangular coordinate system is specified with its location relative to center. Normally, this value is (0,0).

Position in the 2-D Plane (IXC3, IYC3, SEC3)

Specifies where the 2-D plane will be positioned in 3-D space. <tt>IXC3, IYC3</tt> specifies the 3-D coordinate corresponding to the X and Y coordinates in the 2-D plane in the form of numbers (1, 2, 3), which represent the X, Y, and Z axes, respectively. When negative values are specified for these values, the values are assigned with inversed signs. <tt>SEC3</tt> is the remaining coordinate value.

Settings for Perspective Transformation

In perspective transformation, the parameters that determine transformation function are also specified after calling <tt>Frame.new</tt> and before drawing graphics. The parameters for perspective transformation are independent from those of the 2-D and 3-D normalization transformations.

The main parameters are all handled by Fig module. To set the parameters for transformation function, the following coding is performed after <tt>Frame.new</tt>.

Fig.eyepoint=[XEYE3, YEYE3, ZEYE3]
Fig.objpoint=[XOBJ3, YOBJ3, ZOBJ3]

All other parameters are specified with parameters in Fig module as necessary. To allocate a 2-D plane to a 3-D plane, <pre>

Fig.plane=[IXC3, IYC3, SEC3]

will be called. This will permit the graphics routines on the 2-D planes to be used on a plane in a 3-D space.

Output Primitives

The basic elements constituting a graphic are called output primitives. AdvancedDCL has the following output primitives.

There are other secondary primitives besides these.

Five of these six primitives (excluding the tone primitive) all consist of line segments. Line segments have two attributes: the line index and line type. A tone has the attribute of tone pattern index. These attributes are defined as follows.

Coordinates handled by AdvancedDCL include curvilinear coordinates, so it is not appropriate in some cases to connect coordinates specifying line segments and boundaries of tone patterns with straight lines. Therefore, a function is available that interpolates between the coordinates by dividing the space between the coordinates into several sections. Furthermore, all primitives are subject to clipping at a certain boundary.

Line Indices

The thickness and color of a line segment drawn by AdvancedDCL is specified with a 3-digit integer (nnm) called the line index. Even when outputting to a device that can only change either the thickness or color, two lines with different line indexes can be distinguished because the line indexes follow the rules below for thickness and color.

In a system where both the thickness and color can be changed, the first 2 digits (nn=0- 99) indicate the color index, and the last digit (m=0- 9) represents thickness. The standard color indexes from 1 to 5 indicate

  1. white or black (foreground)
  2. red
  3. green
  4. blue
  5. :yellow

Colors specified by larger indexes are defined in the color map file. The line thickness is specified by 1(fine) - 9(thick). With an output device in which only the line thickness can be changed, nn is read as m only when m=0. With an output device in which only the color can be changed, m is read as nn only when nn=0. Therefore, except in cases where the line thickness and color needs to be specified, specification with a single-digit index will make the lines distinguishable in a device-dependent method.

Line Types

Line types indicate solid, dashed, and doted lines. The following line types are allotted to numbers 1 through 4.

  1. solid
  2. dashed
  3. dotted
  4. alternate long and short dash

All other integers besides 0 specify a line type which uses the bit pattern of the lower N bits (N is a value determined by the internal variable <tt>'NBITS'</tt>. Initial value is 16; For example, when N=16 and <tt>ITYPE</tt> = Z'0000F0F0' (hexadecimal constant), the line type is specified as '<u>4bits ON</u> 4bits OFF <u>4bits ON</u> 4bits OFF'. The length of 1 bit is determined by the parameter <tt>bitlen</tt> in Plot module.

Tone Pattern Number

Tone pattern indexes contain information on both color and pattern. The last 3 digits specify the pattern index and all preceding digits specify the color. When the color is not specified (specification only by 3 digits), the foreground color (color index 1) is used.

The first of the three digits for the pattern index represent the pattern type.

  1. Dot
  2. Horizontal hatch
  3. Right-up hatch
  4. Vertical hatch
  5. Left-up hatch
  6. Cross hatch
  7. Diagonal cross hatch

The second of the three numbers for pattern index specifies the dot size or line thickness with numbers from 0 to 5. Larger values indicate larger dots or thicker lines. The last digit specifies the density of the dots or diagonal lines with numbers from 0 to 5. Larger values indicate higher densities of dots or lines. No dots or lines are drawn for 0.

Pattern index 999 specifies a solid fill.

With color displays and printers, solid fill patterns with specified colors are often used. There is an option that will convert the color indexes into different pattern indexes for dot patterns so that the fill areas can be distinguished even when such programs are executed on environments that do not support color.

There are no patterns defined for integer values other than for the combinations above.

Interpolation and Clipping

There are 2 interpolation functions.

In a map projection function, the singular point is always at the pole in TC, so by specifying a great circle, the line segments in the vicinity of the singular point can be more appropriately drawn. The following are the parameters for Fig module.

Clippings will be performed in the following locations.

The clipping is done around a clipping rectangle with sides parallel to the axes of the coordinate system. Therefore, when the pole is moved in a rotation of a map projection, the clipping boundaries in the TC will not coincide with the meridians and parallels.

The following are the parameters in Fig module for this function.

The clipping of a viewport can be switched ON/OFF with <tt>lclip</tt>. Other clippings will always be performed. In orthographic projections, the line segments on the reverse side will also be drawn when the default value for the clipping boundary in TC is used. To draw only lines on the front side, set <tt>'TYMIN'</tt> to 0.

Caution on Clipping Tone Patterns

The tone patterns in the DCL normally (if not clipped) fill a polygon even when the specified boundaries of the polygons overlap. More precisely, soft fill is performed following the Even Odd Rule and hard fill is machine-dependent, but even the hard fills are made so as to follow the rules of soft fills as much as possible.

In earlier versions, clippings could not be made on a hard fill, but from DCL ver.5, <b>clippings can be made on hard fill in a way similar to a soft fill</b>. In other words, the clipping of the tone pattern is not performed by the hardware. Instead, boundary points specifying the overlap in the specified region and the clipping range are generated, and the data are handed over to the tone routine. The algorithm for calculating this clipped boundary line runs on the precondition that the direction of the boundary line is known. Here, the direction of the boundary line is the clockwise or counter-clockwise direction in which the sequence of points defining the boundary is specified. Although this algorithm has poor compatibility with traditional rules for fill tone patterns, it was created nonetheless since the direction of the boundary line on the map (TC) must be provided to determine the outside and inside of the boundary.

The actual procedure of tone clipping is as follows.

  1. The boundary line is clipped and divided into several line segments.
  2. The segmented lines are reconnected to form a closed boundary. When IRMODE=0</tt>, the line segments are connected in the counter-clockwise direction; when <tt>IRMODE=1</tt>, in the clockwise direction.
  3. The generated boundary line is filled in following traditional rules. The traditional rules are applied to regions which had not been clipped, and <tt>IRMODE</tt> holds no meaning. This means that the exterior of the boundary line cannot be filled by specifying some appropriate <tt>IRMODE </tt>.

Therefore, it is dangerous to perform clipping when filling in a polygon with overlapping boundaries. To be on the safe side, the user is advised to set the direction of the boundary lines and use smaller, simpler polygons when clipping.

When you wish to fill the outside of a polygon, divide the area into 2 sections so that the polygon will definitely be be clipped, reset the clipping area (viewport), and call the tone routine twice.

Layout

The x- and y-axes in a R coordinate both range from 0 to 1, and the frame has an aspect ratio of 1:1. In contrast, actual devices have various aspect ratios. When the aspect ratios of the frame and the device are different, the workstation transformation is normally set to inscribe the largest frame at the center of the device when <tt>Frame.new</tt> is called.

However, in some cases, you may want to use the full area of the device, or to set some margin around the figure. In such a case, the Frame and Page module are used. They are basically used for setting the workstation transformations, and it contains functions for changing the aspect ratio of the frame, as well as placing character strings such as titles in the margin, and placing several frames in a single page. Such functions are called the layout function.

To use these layout functions, first open the device and then make the appropriate settings before calling <tt>Frame.new</tt>. For example,

Dev.open
Frame.div('S', 4, 3)   ! Divide page into 4 n 3.
Frame.new
. . . . . . . . 
Frame.new
. . . . . . . . 
Dev.close

A page will now be set to contain 12 frames.

Modules of this library

A module list and methods of each module are shown in following.

NumRu::AdvancedDCL::Axis

About this module

This is the module for drawing axes automatically.

Position of Coordinate Axes

To use Axis, Axis::Lin, Axis::Log modules, the normalization transformation (in a Cartesian coordinate system) for transformation function number 1-4 must be set. (See basics of this library ) For example, assume that the following calls have been made.

Fig.viewport=[VXMIN,VXMAX,VYMIN,VYMAX]
Fig.window=[UXMIN,UXMAX,UYMIN,UYMAX] 
Fig.transnum=ITR

</blockquote>Then, Axis::Lin can set the coordinate axes in the following positions.

For X axis;

'<tt>B</tt>'ottom - on a line connecting (<tt>UXMIN, UYMIN)</tt> and <tt> (UXMAX, UYMIN)</tt>
'<tt>T</tt>'op - on a line connecting <tt>(UXMIN, UYMAX)</tt> and <tt>(UXMAX, UYMAX)</tt> 
'<tt>U</tt>'ser - on a line connecting <tt>(UXMIN, UYUSER)</tt> and <tt>(UXMAX, UYUSER)</tt>

For Y axis;

'<tt>L</tt>'eft - on a line connecting <tt>(UXMIN, UYMIN)</tt> and <tt> (UXMIN, UYMAX)</tt>
'<tt>R</tt>'ight - on a line connecting <tt>(UXMAX, UYMIN)</tt> and <tt> (UXMAX, UYMAX)</tt>
'<tt>U</tt>'ser - on a line connecting <tt>(UXUSER, UYMIN)</tt> and <tt> (UXUSER, UYMAX)</tt>

The <tt>'B'</tt>, <tt>'T'</tt>, and <tt>'U'</tt> for the x axis, and the <tt>'L'</tt>, <tt>'R'</tt>, and <tt>'U'</tt> for the y axis, will be used as a parameter (<tt>CSIDE</tt>) for specifying the position to draw the components of the coordinate axes (see next section). <tt>UXUSER</tt> and <tt>UYUSER</tt> become effective when the internal variables <tt>'UXUSER'</tt> and <tt>'UYUSER'</tt> are set. (The initial values are undefined.) These positions for the coordinate axes can be shifted parallel in the Y direction using <tt>Axis::Lin.xsaxs</tt> in the Axis::Lin module, and shifted parallel in the X direction using <tt>Axis::Lin.ysaxs</tt>.

Components and Attributes of the Axes

The coordinate axes drawn by Axis::Lin have the following components. (The names of the subroutines which draws the component are shown in parentheses.)

  1. Line segment for the axes <tt>(Axis::Lin.xpaxs/ypaxs)</tt>
  2. Tick Marks <tt>(Axis::Lin.xptmk/yptmk)</tt>
  3. Label

  4. Title <tt>(Axis::Lin.xpttl/ypttl)</tt>

The components have the following attributes.

  1. Line segment for the axes

    a. The line index of a line segment <ISLCT>
  2. Tick Marks

    a. The length of a tick mark <ISLCT>
    b. The line index for the line of a tick mark <ISLCT>
  3. Label

    a. The character height <ISLCT>
    b. The angle of rotation of the text <CSIDE>
    c. The centering option of the text <CSIDE>
    d. The line index for the lines of the text <ISLCT>
  4. Title

    a. The character height <ISLCT>
    b. The angle of rotation of the text <CSIDE>
    c. The centering option of the text <Argument>
    d. The line index for the lines of the text <ISLCT>

The methods for specifying these attributes and the definitions of <ISLCT>, <CSIDE>, <Argument>will be given in the next section.

When the parameters for the coordinate axes are not set by '<tt>U</tt>'ser, the label and title will always be drawn on the outside of the window. When set by&nbsp; '<tt>U</tt>'ser, the label and title will be drawn on the side of the axes specified by the internal variable <tt>'IFLAG'</tt>.

Specification of Attributes

Each subroutine in Axis::Lin have two arguments named <tt>ISLCT</tt> and <tt>CSIDE</tt>. These two and other arguments specify the attributes of each component.

  1. ISLCT takes the value of 0, 1, or 2 Of the attributes introduced, those with <ISLCT> are set by inquiring the the internal variable specified by these arguments. The actual meanings of ISLCT=0,1,2 are

For example, the line index of the line for the axis has the internal variables <tt>'INDEXT0'</tt>, <tt>'INDEXT1'</tt>, and <tt>'INDEXT2'</tt>for<tt>ISLCT=0,1,2</tt>, respectively (with initial values of undefined, 1, and 3, respectively), and the attributed are set by inquiring these internal variables. Hereafter, this will be expressed as: &quot;The attributes of the line index will be set by inquiring the values specified by the internal variables <tt>'INDEXT</tt><i>i</i><tt>' </tt>(The initial values are undefined, 1, and 3).&quot; These internal variables can be inquired/changed using <tt>Axis::Lin.get</tt>, <tt>Axis::lin.set</tt>.

  1. CSIDE specifies the position to draw the component as well as to set the attributes that are dependent on the draw position. Of the attributes, those with <CSIDE> are set by inquiring the internal variables specified by this argument. For example, the angle of rotation of the X axis title has the internal variables <tt>'IROTCXB'</tt>, <tt>'IROTCXT'</tt>, and <tt>'IROTCXU' </tt>for&nbsp; <tt>CSIDE='B','T', and 'U'</tt>, respectively (with initial values of 0, 0, and 0, respectively), and the attributes are set by inquiring these internal variables. Hereafter, this will be expressed as: The attributes of the rotation angle of the&nbsp; X axis title will be set by inquiring the values specified by the internal variables <tt>irotcx(s)</tt>(The initial values are 0, 0, and 0.). Also, the angle of rotation of the Y axis title has the internal variables <tt>irotcyl</tt>, <tt>irotcyr</tt>, and <tt>irotcyu</tt> for <tt>CSIDE='L','R', and 'U'</tt>, respectively (with initial values of 1, 1, and 1, respectively), and the attributes are set by inquiring these internal variables. Hereafter, this will be expressed as: The attributes for the angle of rotation of the Y axis title will be set by inquiring the values specified by the internal variables <tt>irotcy(s)</tt> (The initial values are 1, 1, and 1.). Furthermore, the <tt>irotcx(s)</tt> and <tt>irotcy(s)/tt> will be collectively expressed as: The attributes for the angle of rotation of the axis labels will be set by inquiring the values specified by the internal variables <tt>irotc(zs)</tt> (The initial values are 0, 0, 0, 1, 1, and 1.).
  2. Of the attributes, those with <Argument> are set by directly specifying the value of the argument.

The attributes are actually set by the following method.

  1. The line segment for axis

    a. The line index of the line segment <ISLCT>
    A line segment is drawn using the line index specified by the internal variable <tt>indext(i)</tt>. (The initial values are undefined, 1, and 3.)  
  2. The tick marks

    a. Length of a tick mark <ISLCT>
    Tick marks are drawn using the length (shown in units in VC) specified by the internal variables <tt>rsizet(i)</tt>. (The initial values are undefined, 0.007, and 0.014.)  
    b. The line index for a tick mark <ISLCT>
    Tick marks are drawn using the line index specified by the internal variables <tt>indext(i)</tt>. (The initial values are undefined, 1, and 3.) [Note: The direction the tick marks are drawn is set by the internal variable <tt>inner</tt>. When <tt>inner</tt> has a positive value, the tick marks are drawn towards the inside, and when negative, drawn towards the outside. (The initial value is +1.)]  
  3. Labels

    a. Character height <ISLCT>
    Characters are drawn using the character height (shown in units in VC) specified by the internal variables <tt>rsizel(i)</tt>. (The initial values are undefined, 0.021, and 0.028.)  
    b. Angle of rotation of text <CSIDE>
    Labels are drawn using the angle of rotation option specified by the internal variables <tt>irotl(zs)</tt>. (The initial values are 0, 0, 0, 0, 0, and 0.) The angle of rotation option is specified by an integer value when a unit of rotation for the label is a rotation of 90 degrees. (For example, when performing a rotation of&nbsp; 90 degrees, specify 1, and when performing a rotation of -90 deg., specify -1.)    
    c. Centering option of text <CSIDE>
    Labels are drawn using the centering option specified by the internal variables <tt>icent(zs)</tt>. (The initial values are 0, 0, 0, +1, +1, ane +1.) The centering option specifies whether the label is drawn by left aligned (-1), centered (0), or right aligned (+1).  
    d. Line index of the line for the text <ISLCT>
    Characters are drawn using the line index specified by the internal variables <tt>indexl(i)</tt>. (The initial values are undefined, 3, and 3.)  
  4. Titles

    a. Character height <ISLCT>
    Characters are drawn using the character height (in units in VC) specified by the internal variables <tt>rsizec(i)</tt>. (The initial values are undefined, 0.028, and 0.035.)  
    b. Angle of rotation of text <CSIDE>
    Titles are drawn using the angle of rotation option specified by the internal variables <tt>irotc(zs)</tt>. (The initial values are 0, 0, 0, +1, +1, and +1.) The angle of rotation option is specified by an integer value when a unit of rotation for the title is a rotation of 90 degrees. (For example, when performing a rotation of&nbsp; 90 degrees, specify 1, and when performing a rotation of -90 deg., specify -1.)    
    c. Centering option of text <Argument>
    Titles are drawn using the centering option specified by the argument. The centering option specifies whether the label is drawn by left aligned (-1), centered (0), or right aligned (+1).  
    d. Line index of the line for the text&nbsp; <ISLCT>
    Characters are drawn using the line index specified by the internal variables <tt>indexl(i)</tt>. (The initial values are undefined, 3, and 3.) 

Parameter

Name Type DCL package

ireset(Fixnum)<USPACK>

A variable for specifying the automatic resetting of parameters with <tt>USINIT</tt>. The initial value is 1.

USINIT is normally called from Frame.new.

lxinv(true or false)<USPACK>

Inverts the X axis (left-right) when true.

lyinv(true or false)<USPACK>

Inverts the Y axis (top-bottom) when true.

lmatch(true or false)<USPACK>

When true, the intervals of the labels and characters for the X and Y axis are set to be equal.

rmrgn(Float)<USPACK>

The width of a margin. Units in width of character (9.524).

xfac*(Float)<USPACK>

The value of the X axis factor (999).

yfac*(Float)<USPACK>

The value of the Y axis factor (999).

xoff*(Float)<USPACK>

The offset value of an uniform X axis (999).

yoff*(Float)<USPACK>

The offset value of an uniform Y axis (999).

dxt*(Float)<USPACK>

The interval of the tick marks for an uniform X axis (999).

dyt*(Float)<USPACK>

The interval of the tick marks for an uniform Y axis (999).

dxl*(Float)<USPACK>

The interval of the labels for an uniform X axis (999).

dyl*(Float)<USPACK>

The interval of the labels for an uniform Y axis (999).

tfact(Float)<USPACK>

The approximate interval of tick marks for an uniform coordinate system (2). A convenient value is selected for DUT, with an interval smaller than this value is multiplied by the character width.

mxdgtx(Fixnum)<USPACK>

The maximum number of digits in the label for the uniform X axis (4).

mxdgty(Fixnum)<USPACK>

The maximum number of digits in the label for the uniform Y axis (4). When the number of digits in the label exceed this value, set UOFF and UFAC so that the number of digits is lower than this value.

nblank1(Fixnum)<USPACK>

The minimum number of blanks between the labels when the labels are parallel to the axis. (Uniform coordinate system) (1).

nblank2(Fixnum)<USPACK>

The minimum number of blanks between the labels when the labels are perpendicular to the axis. (Uniform coordinate system) (2).

nlblx*(Fixnum)<USPACK>

The label format for a log X axis (999).

nlbly*(Fixnum)<USPACK>

The label format for a log Y axis (999).

nticksx*(Fixnum)<USPACK>

The number of ticks in a single order for a log X axis (999).

nticksy*(Fixnum)<USPACK>

The number of ticks in a single order for a log Y axis (999).

itypex*(Fixnum)<USPACK>

The type of log X axis (999).

itypey*(Fixnum)<USPACK>

The type of log Y axis (999).

mxdgtsx(Fixnum)<USPACK>

When the sub-labels for the X axis are drawn horizontally, they are drawn so that they do not exceed the range of character numbers for the label specified by mxdgtsx.

mxdgtsy(Fixnum)<USPACK>

When the sub-labels for the Y axis are drawn vertically, they are drawn so that they do not exceed the range of character numbers for the label specified by mxdgtsy.

lprtct(true or false)<USPACK>

Specifies that the sub-labels should not invade the label area for the other axis. When this is true, then the specifications in mxdgtsx/mxdgtsy are ignored.

soffxtr*, soffxtl*, soffxbr*, soffxbl*, soffxur*, soffxul*(Float)<USPACK>

The offset value of the X-axis sub-label.

soffytr*, soffyrb*, soffylt*, soffylb*, soffyut*, soffyub*(Float)<USPACK>

The offset value of the Y-axis sub-label.

xdtmax*, xdtmin*(Float)<USPACK>

The maximum and minimum values of the X axis set by Fig.inclpoint.

ydtmax*, ydtmin*(Float)<USPACK>

The maximum and minimum values of the Y axis set by Fig.inclpoint.

cxttl(String)<USPACK>

The X- axis title (shorter than 32 characters)

cyttl(String)<USPACK>

The Y- axis title (shorter than 32 characters)

cxfmt(String)<USPACK>

>The X-axis label format. (Note 1)

cyfmt(String)<USPACK>

The Y-axis label format. (Note 1)

cxside(String)<USPACK>

The position to plot the X axis. You may specify this using up to 2 characters out of <tt>'T'(Top), 'B'(Bottom), 'U'(User)</tt>. Of the 2 characters specified, the subtitle and title is written in the position specified first. (Note 2)

cyside(String)<USPACK>

The position to plot the Y axis. You may specify this using up to 2 characters out of <tt>'R'(Right), 'L'(Left), 'U'(User)</tt>. Of the 2 characters specified, the subtitle and title is written in the position specified first. (Note 2)

cxspos(String)<USPACK>

The position to write the X-axis sub-label: 'R' or 'L'

cyspos(String)<USPACK>

The position to write the Y-axis sub-label: 'T' or 'B'

cxunit(String)<USPACK>

The unit to write in the X-axis sub-label (shorter than 32 characters)

cyunit(String)<USPACK>

The unit to write in the Y-axis sub-label (shorter than 32 characters)

cblkt(String)<USPACK>

The brackets for the sub-labels. The initial value is '()' When a blank is specified, no brackets are written.

labelxb, labelxt, labelxu, labelyl, labelyr, labelyu(true or false)<UZPACK>

An internal variable which specifies whether or not to draw labels. Labels drawn when <tt>.TRUE.</tt>; not drawn when false. (The initial values are true, false, true, true, false, true)

rsizet0, rsize1, rsize2 (Float)<UZPACK>

An internal variable which specifies the length of the tick mark in units in VC. (The initial values are undefined, 0.007, and 0.014).

rsizel0, rsizel1, rsizel2 (Float)<UZPACK>

An internal variable which specifies the character height of the characters of the label in units in VC. (The initial values are undefined, 0.021, and 0.028.)

rsizec0, rsizec1, rsizec2 (Float)<UZPACK>

An internal variable which specifies the character height of the characters of the title in units in VC. (The initial values are undefined, 0.028, and 0.035)

uxuser(Float)<UZPACK>

The value of the X coordinate which is used when '<tt>U</tt>'ser is specified as the parameter to specify position in the draw routine of the Y axis. (The initial value is undefined.)

uyuser(Float)<UZPACK>

The value of the Y coordinate which is used when '<tt>U</tt>'ser is specified as the parameter to specify position in the draw routine of the X axis. (The initial value is undefined.)

irotl(zs) (Fixnum) <UZPACK>

An internal variable which specifies the angle of rotation of the label text. The amount of rotation is specified using integer values when a unit of rotation is 90 degrees. (The initial values are 0, 0, 0, 0, 0, and 0.)

irotc(zs) (Fixnum) <UZPACK>

An internal variable which specifies the angle of rotation of the title text. The amount of rotation is specified using integer values when a unit of rotation is 90 degrees. (The initial values are 0, 0, 0, 0, 0, and 0.)

icent(zs) (Fixnum) <UZPACK>

An internal variable which specifies the centering option of the label text. Left-aligned when -1, centered when 0, and right-aligned when +1. (The initial values are 0, 0, 0, +1, +1, and +1.)

indext(i) (Fixnum) <UZPACK>

An internal variable which specifies the line index of the line segment for drawing tick marks. (The initial values are undefined, 1, and 3.)

indexl(i) (Fixnum) <UZPACK>

An internal variable which specifies the line index of the line segment for characters in labels and text. (The initial values are undefined, 3, and 3.)

loffset (true or false) <UZPACK>

An internal variable which specifies whether or not to perform linear offset of the coordinate system. Offset when true; Not offset when false. (The initial value is false.)

xoffset (Float) <UZPACK>

An internal variable which specifies the amount of X axis offset when loffset is true. (The initial value is 0.0.)

yoffset (Float) <UZPACK>

An internal variable which specifies the amount of Y axis offset when loffset is true. (The initial value is 0.0.)

xfact (Float) <UZPACK>

An internal variable which specifies the value of the X axis factor when loffset is true. (The initial value is 1.0.)

yfact (Float) <UZPACK>

An internal variable which specifies the value of the Y axis factor when loffset is <tt>.TRUE.</tt>. (The initial value is 1.0.)

pad1 (Float) <UZPACK>

An internal variable which specifies the distance between the label and the axis component last drawn. (The initial value is 0.7 when the height of the label to be drawn is 1.)

pad2 (Float) <UZPACK>

An internal variable which is used when internally determining the amount of offset for the axis. (The initial value is 1.5, when the size of the internal variable rsizec2 is 1.)

iflag (Fixnum) <UZPACK>

An internal variable which specifies on which side of the axis the labels and titles are drawn when the parameter '<tt>U</tt>'ser is used in the axis settings. When iflag is positive, the labels are drawn above the axis for Axis::Lin.xplbl and on the right for Axis::Lin.yplbl. When iflag is negative, the labels are drawn on the opposite sides. (The initial value is -1. )

lbtwn (true or false) <UZPACK>

An internal variable which specifies the options for the position to draw the labels. When lbtwn is true, the labels are drawn in between the positions specified and when false, at the positions specified. (The initial value is false.)

rbtwn (Float) <UZPACK>

Specifies the detailed position of the label when the labels are drawn in between the positions specified (when lbtwn is true). Left-aligned when -1, centered when 0, right-aligned when +1. (The initial value is 0.0.)

lbound (true or false) <UZPACK>

Specifies whether to draw the title when the title exceeds the width of the viewport. Not drawn when true, drawn when false. (The initial value is false.)

lbmsg (true or false) <UZPACK>

Specifies whether to print an error message when lbound is true and there is not enough space for the title. Error message printed when true, not printed when false. (The initial value is true.)

inner (Fixnum) <UZPACK>

An internal variable which specifies on which side of the axis the tick marks are drawn. When inner is positive, the tick marks are drawn on the outside, and when negative, drawn on the inside. (The initial value is +1.)

iundef (Float) <UZPACK>

An internal variable which indicates that the value is undefined. (The initial value is -999.)

  1. When these formats are specified explicitly, <tt>DXL</tt> and <tt>DYL</tt> must be specified accordingly since this information is not reflected in label intervals.
  2. When the label(zs) of the first position specified by the internal variables cxside and cyside is false, then neither the subtitle or title is written.

In addition, These parameters can be used as methods. For example, it is possible to refer the parameter "ireset" with Axis.ireset method. Moreover, it is possible to set the parameter "ireset" with Axis.ireset= method.

Axis.set(key, val)

Sets parameters. If val is nil, the value of the parameter will return default value in DCL.

Arguments

Example

Axis.set("cxttl", "xtitle")      # Sets the title of X axis "xtitle".

Axis.get(key)

Refers the value of the parameter.

Arguments

Example

Axis.get("cxttl")      # Refers the title of X axis.

Axis.reset(key)

Sets the value of the parameter default value.

Arguments

Example

Arrow.reset("cxttl")      # Sets the title of X axis a default value.

Axis.help_params

Refers available parameters in Axis module.

Arguments

None

Notes

  1. This method return name of the parameter, present value, type of the parameter.

Axis.sync

Synchronizes the value of a parameter in DCL with the present value of the parameter in AdvancedDCL.

Arguments

None

Notes

In AdvancedDCL, parameters which set with "set" method do not synchronize with DCL and a method to synchronize parameters is called in drawing methods. This method is used to synchronize parameters with these of DCL directly.

Axis.zfact(rfact)

Multiplies all of the internal variables rsizet(i), rsizel(i) and rsizec(i) (i=1,2) by a certain factor.

Arguments

Notes

  1. UZFACT is called in this method.

Axis.title(cxttl, cxunit, cyttl, cyunit)

Specifies the title of the coordinate axis and the unit in the sub-label drawn by Axis.draw

Arguments

Notes

  1. USSTTL is called in this method.
  2. When you do not wish to put a title, specify a blank space more than 1 character long.

Axis.xpttl(cside, islct, cttl, px, temp=nil)

Draws a title.

Arguments

Notes

  1. UXPTTL is called in this method.
  2. The character size of the title is specified by the internal variable rsizec(i).
  3. The angle of rotation of the title text is specified by the internal variable irotc(zs).
  4. The line index of the line for the characters in the title is specified by the internal variable indexl(i).
  5. When the internal variable lbound is true and the title exceeds the width of the window, the title is not drawn. When lbound is false, the title is drawn when when it exceeds the window width. (The initial value is false.) Also, when the internal variable lbound is true, the title exceeds the window width so it&nbsp; cannot be drawn, a message will be printed if the internal variable lbmsg is true, and will not be printed when false. (The initial value is true.)

Axis.ypttl(cside, islct, cttl, py, temp=nil)

Draws a title.

Arguments

Notes

  1. UYPTTL is called in this method.
  2. The character size of the title is specified by the internal variable rsizec(i).
  3. The angle of rotation of the title text is specified by the internal variable irotc(zs).
  4. The line index of the line for the characters in the title is specified by the internal variable indexl(i).
  5. When the internal variable lbound is true and the title exceeds the width of the window, the title is not drawn. When lbound is false, the title is drawn when when it exceeds the window width. (The initial value is false.) Also, when the internal variable lbound is true, the title exceeds the window width so it&nbsp; cannot be drawn, a message will be printed if the internal variable lbmsg is true, and will not be printed when false. (The initial value is true.)

Axis.xmttl(cside, cttl, px, temp=nil)

Draws a major title.

Arguments

Notes

  1. UXMTTL is called in this method.
  2. This routine uses UXPTTL/UYPTTL (ISLCT=2) to draw the title.

Axis.ymttl(cside, cttl, py, temp=nil)

Draws a major title.

Arguments

Notes

  1. UYMTTL is called in this method.
  2. This routine uses UXPTTL/UYPTTL (ISLCT=2) to draw the title.

Axis.xsttl(cside, cttl, px, temp=nil)

Draws a minor title.

Arguments

Notes

  1. UXSTTL is called in this method.
  2. This routine uses UXPTTL/UYPTTL (ISLCT=1) to draw the title.

Axis.ysttl(cside, cttl, yx, temp=nil)

Draws a minor title.

Arguments

Notes

  1. UYSTTL is called in this method.
  2. This routine uses UXPTTL/UYPTTL (ISLCT=1) to draw the title.

Axis.draw(x=nil, y=nil, temp=nil)

Plots the default coordinate axis. Also draws the title when it is specified.

Arguments

Notes

  1. USDAXS is called in this method.
  2. If window is not set, window is automatically set by arguments x,y.

Axis.xax(cside, x=nil, y=nil, temp=nil)

Calculates appropriate intervals for the tick marks and labels for the currently set transformation function, and plots a single coordinate axis in the specified position.

Arguments

Notes

  1. USXAXS is called in this method.
  2. If window is not set, window is automatically set by arguments x,y.

Axis.yax(cside, x=nil, y=nil, temp=nil)

Calculates appropriate intervals for the tick marks and labels for the currently set transformation function, and plots a single coordinate axis in the specified position.

Arguments

Notes

  1. USYAXS is called in this method.
  2. If window is not set, window is automatically set by arguments x,y.

NumRu::AdvancedDCL::Dateaxis

About this module

The Dateaxis module is a subroutine package for plotting a coordinate axis with dates for tick marks. To plot this type of coordinate axis, the normalization transformation must be set using units in days. The coordinate axis will be plotted from the position corresponding to 0 in the user-defined coordinate system (UC). Therefore, if you wish to allot a period from Jan. 1 to Jan. 31 to the full viewport size, specify the ends of the window as (0, 30).

Below are explanation of the arguments CSIDE, JD0, and ND, which are common in the subroutines.

Parametrs

Name Type DCL package

nday (Fixnum) <UCPACK>

Specifies the interval for plotting tick marks and labels of dates when using Dateaxis.xady, Dateaxis.yady. If 'nday' is undefined, then an appropriate value is selected from 0, 1, 2, 5, 10, or 15. (When 0, only the axis is plotted, and no ticks or labels are drawn.) When explicitly specified, the specified value is used. (The initial value is undefined.) This value is specified by the DCL function 'NUCDAY'.

nchar (Fixnum) <UCPACK>

Specifies the number of letters in the month for the label when using Dateaxis.xamn, Dateaxis.yamn. If 'nchar' is undefined, then an appropriate value is selected from 0, 1, 2, 3, or 9. (When 0, only the axis is plotted, and no ticks or months are drawn) When explicitly specified, the specified value is used. (The initial value is undefined.) This value is specified by the DCL function 'NUCCHR'.

lower (true or false) <UCPACK>

Specifies whether to write the letters after the second letter in lower case for the name of the month written by Dateaxis.xady, Dateaxis.yady. In lower case when true; in upper case when false. (The initial value is false.)

iundef (Fixnum) <UCPACK>

The internal variable indicating that the value is undefined. (The initial value is -999.)

In addition, These parameters can be used as methods. For example, it is possible to refer the parameter "nday" with Dateaxis.nday method. Moreover, it is possible to set the parameter "nday" with Dateaxis.nday= method.

Dateaxis.set(key, val)

Sets parameters. If val is nil, the value of the parameter will return default value in DCL.

Arguments

Example

Dateaxis.set("nday", 15)      # Sets 'nday'15.

Dateaxis.get(key)

Refers the value of the parameter.

Arguments

Example

Dateaxis.get("nday")      # Refers 'nday'.

Dateaxis.reset(key)

Sets the value of the parameter default value.

Arguments

Example

Dateaxis.reset("nday")      # Sets 'nday' a default value.

Dateaxis.help_params

Refers available parameters in Dateaxis module.

Arguments None

Notes

  1. This method return name of the parameter, present value, type of the parameter.

Dateaxis.sync

Synchronizes the value of a parameter in DCL with the present value of the parameter in AdvancedDCL.

Arguments

None

Notes

In AdvancedDCL, parameters which set with "set" method do not synchronize with DCL and a method to synchronize parameters is called in drawing methods. This method is used to synchronize parameters with these of DCL directly.

Dateaxis.xdraw(cside, jd0, nd, x=nil, y=nil, temp=nil)

Plots a coordinate axis for day, month, and year.

Arguments

備考

  1. UCXACL is called in this method.
  2. Dateaxis.xdraw makes successive calls to Dateaxis.xday, Dateaxis.xamn, Dateaxis.xayr.

Dateaxis.ydraw(cside, jd0, nd, x=nil, y=nil, temp=nil)

Plots a coordinate axis for day, month, and year.

Arguments

備考

  1. UCYACL is called in this method.
  2. Dateaxis.ydraw makes successive calls to Dateaxis.yday, Dateaxis.yamn, Dateaxis.yayr.

Dateaxis.xady(cside, jd0, nd, x=nil, y=nil, temp=nil)

Plots the coordinate axis for days.

Arguments

notes

  1. UCXADY is called in this method.
  2. When the window is not specified, the window is specified from x and y if they are specified as arguments.
  3. The intervals of the tick marks and labels for date are specified using the internal variable 'nday' though the DCL function NUCDAY. When 'nday' is undefined, then an appropriate value is selected out of 0, 1, 2, 5, 10, and 15. (When the value is smaller than 1, only the axis is plotted and no ticks or labels are plotted.) When explicitly specified, the specified value is used. (The initial value is undefined.)
  4. An array is prepared internally for storing the information for plotting the ticks and days on the labels. The array size restricts the maximum number of ticks and dates (labels) to 100.
  5. Dateaxis.xady, Dateaxis.yady plots axis using Axis::Lin.xpaxs, Axis::Lin.ypaxs (ISLCT=2), plots tick marks using Axis::Lin.xptmk, Axis::Lin.yptmk (ISLCT=1), and labels of days using Axis::Lin.xplbl, Axis::Lin.yplbl (ISLCT=1). Therefore, the attributes for these component elements of the axes can be inquired/changed using the Axis::Lin module. However, 'icent(zs)' must be 0. 'irotl(zs)' inquires 'irotc(zs)' and uses the value. 'lbtwn' is false.

Dateaxis.yady(cside, jd0, nd, x=nil, y=nil, temp=nil)

Plots the coordinate axis for days.

Arguments

notes

  1. UCYADY is called in this method.
  2. When the window is not specified, the window is specified from x and y if they are specified as arguments.
  3. The intervals of the tick marks and labels for date are specified using the internal variable 'nday' though the DCL function NUCDAY. When 'nday' is undefined, then an appropriate value is selected out of 0, 1, 2, 5, 10, and 15. (When the value is smaller than 1, only the axis is plotted and no ticks or labels are plotted.) When explicitly specified, the specified value is used. (The initial value is undefined.)
  4. An array is prepared internally for storing the information for plotting the ticks and days on the labels. The array size restricts the maximum number of ticks and dates (labels) to 100.
  5. Dateaxis.xady, Dateaxis.yady plots axis using Axis::Lin.xpaxs, Axis::Lin.ypaxs (ISLCT=2), plots tick marks using Axis::Lin.xptmk, Axis::Lin.yptmk (ISLCT=1), and labels of days using Axis::Lin.xplbl, Axis::Lin.yplbl (ISLCT=1). Therefore, the attributes for these component elements of the axes can be inquired/changed using the Axis::Lin module. However, 'icent(zs)' must be 0. 'irotl(zs)' inquires 'irotc(zs)' and uses the value. 'lbtwn' is false.

Dateaxis.xamn(cside, jd0, nd, x=nil, y=nil, temp=nil)

Plots the coordinate axis for months.

Arguments

Notes

  1. UCXAMN is called in this method.
  2. When the window is not specified, the window is specified from x and y if they are specified as arguments.
  3. The number of letters in the label for month is specified by the internal variable 'nchar' through the DCL function NUCCHR. When 'nchar' is undefined, then an appropriate value is selected out of 0, 1, 2, 3, and 9. (When 'nchar' is 0, only the axis is plotted, and no ticks or labels are plotted.) When explicitly specified, the specified value is used. (The initial value is undefined.) When the value of 'nchar' is negative, the month (label) is expressed with the number of letters corresponding to the absolute value of 'nchar', with the first letter capitalized.
  4. An array is prepared internally for storing the information for plotting the ticks and months on the labels. The array size restricts the maximum number of ticks and months (labels) to 50.
  5. Dateaxis.xamn/Dateaxis.yamn plots axis using Axis::Lin.xpaxs/Axis::Lin.ypaxs (ISLCT=2), plots tick marks using Axis::Lin.xptmk/Axis::Lin.yptmk (ISLCT=1), and labels of months using Axis::Lin.xplbl/Axis::Lin.yplbl (ISLCT=1). Therefore, the attributes for these component elements of the axes can be inquired/changed using the Axis::Lin module. However, 'ICENT(zs)' must be 0. 'irotl(zs)' inquires 'irotc(zs)' and uses the value. 'lbtwn' is true

Dateaxis.yamn(cside, jd0, nd, x=nil, y=nil, temp=nil)

Plots the coordinate axis for months.

Arguments

Notes

  1. UCYAMN is called in this method.
  2. When the window is not specified, the window is specified from x and y if they are specified as arguments.
  3. The number of letters in the label for month is specified by the internal variable 'nchar' through the DCL function NUCCHR. When 'nchar' is undefined, then an appropriate value is selected out of 0, 1, 2, 3, and 9. (When 'nchar' is 0, only the axis is plotted, and no ticks or labels are plotted.) When explicitly specified, the specified value is used. (The initial value is undefined.) When the value of 'nchar' is negative, the month (label) is expressed with the number of letters corresponding to the absolute value of 'nchar', with the first letter capitalized.
  4. An array is prepared internally for storing the information for plotting the ticks and months on the labels. The array size restricts the maximum number of ticks and months (labels) to 50.
  5. Dateaxis.xamn/Dateaxis.yamn plots axis using Axis::Lin.xpaxs/Axis::Lin.ypaxs (ISLCT=2), plots tick marks using Axis::Lin.xptmk/Axis::Lin.yptmk (ISLCT=1), and labels of months using Axis::Lin.xplbl/Axis::Lin.yplbl (ISLCT=1). Therefore, the attributes for these component elements of the axes can be inquired/changed using the Axis::Lin module. However, 'ICENT(zs)' must be 0. 'irotl(zs)' inquires 'irotc(zs)' and uses the value. 'lbtwn' is true

Dateaxis.xayr(cside, jd0, nd, x=nil, y=nil, temp=nil)

Plots the coordinate axis for years.

Arguments

Notes

  1. UCXAYR is called in this method.
  2. When the window is not specified, the window is specified from x and y if they are specified as arguments.
  3. An array is prepared internally for keeping the information for plotting the ticks and years on the labels. The array size restricts the maximum number of ticks and years (labels) to 50.
  4. Dateaxis.xayr/Dateaxis.yayr plots axis using Axis::Lin.xpaxs/Axis::Lin.ypaxs (ISLCT=2), plots tick marks using Axis::Lin.xptmk/Axis::Lin.yptmk (ISLCT=1), and labels of years using Axis::Lin.xplbl/Axis::Lin.yplbl (ISLCT=1). Therefore, the attributes for these component elements of the axes can be inquired/changed using the Axis::Lin module. However, 'icent(zs)' must be 0. 'irotl(zs)' inquires 'irotc(zs)' and uses the value. 'lbtwn' is true. 'rsizet2' is multiplied by a factor of 1.5.

Dateaxis.yayr(cside, jd0, nd, x=nil, y=nil, temp=nil)

Plots the coordinate axis for years.

Arguments

Notes

  1. UCXAYR is called in this method.
  2. When the window is not specified, the window is specified from x and y if they are specified as arguments.
  3. An array is prepared internally for keeping the information for plotting the ticks and years on the labels. The array size restricts the maximum number of ticks and years (labels) to 50.
  4. Dateaxis.xayr/Dateaxis.yayr plots axis using Axis::Lin.xpaxs/Axis::Lin.ypaxs (ISLCT=2), plots tick marks using Axis::Lin.xptmk/Axis::Lin.yptmk (ISLCT=1), and labels of years using Axis::Lin.xplbl/Axis::Lin.yplbl (ISLCT=1). Therefore, the attributes for these component elements of the axes can be inquired/changed using the Axis::Lin module. However, 'icent(zs)' must be 0. 'irotl(zs)' inquires 'irotc(zs)' and uses the value. 'lbtwn' is true. 'rsizet2' is multiplied by a factor of 1.5.

NumRu::AdvancedDCL::Contour

About this module

The Contour is a module for drawing 2-D contour graphs. The contour lines are drawn in the UC, and are compatible with all normalization transformations. This package only draws the contour lines, and does not draw the outer frames such as the coordinate axes.

The following are the subroutines for the user in the Contour. 

If imformation concerning grid-point coordinates are given a drawing method, grid-point coordinates are set automatically.

If you wish to have a quick look at the contour for a 2-D data set, then simply make a call to Contour.draw. Evenly-spaced grid points will be set to the full extent of the window, and the contour level will be generated automatically.

If the grid points are not evenly spaced, then give Contour.draw method the coordinate values of the grid points .

Or, when you wish to specify the contour level beforehand, then call Contour.gcla or Contour.gclb before making the call to Contour.draw. However, in this case, only contour levels with equal intervals are generated. If you wish to generate contour levels at uneven intervals, or if you wish to add a specific contour level, generate each contour level using Contour.sclv. (To clear a single contour level, call Contour.dclv. To clear all contour levels, call Contour.iclv.)

Parameters

Name Type DCL package

indexmj (Fixnum) <UDPACK>

>The line index of the major line. (The initial value is 3.)

indexmn (Fixnum) <UDPACK>

The line index of the minor line. (The initial value is 1.)

label (true or false) <UDPACK>

Specifies whether to place labels on major lines. Labeled when true not labeled when false. (The initial value is true)

ldash (true or false) <UDPACK>

Specifies whether to use different line types for drawing negative contour lines. When true, the negative contour lines are drawn with line type inquired by the internal variable 'idash'; when false, all contour lines are drawn with the line type inquired by the internal variable 'isolid'. (The initial value is true).

idash (Fixnum) <UDPACK>

The line type used for the negative contour level when 'ldash' is true. (The initial value is 3: dashed line.)

isolid (Fixnum) <UDPACK>

The line type used for contour levels with values larger than 0 when 'ldash'

is true, and for all contour levels when 'ldash' is false. (The initial value is 1: solid line.)

icycle (Fixnum) <UDPACK>

Specifies the number of minor lines to drawn between major lines. One major line is drawn for a cycle of contour lines specified by the value inquired by 'icycle', and the remaining contour lines are minor lines. (The initial value is 2.)

nlev (Fixnum) <UDPACK>

When contour levels are automatically generated, this internal variable is inquired to generate nlev contour levels. (The initial value is 12.)

labelsize (Float) <UDPACK>

The character height of the contour label. (Units in VC; The initial value is undefined.) When this internal variable is undefined, the internal variable 'rsizel1' handled by Axis::Lin is inquired.

lmsg (true or false) <UDPACK>

Specifies whether to write a message in the bottom margin. Message printed when true, not printed when false. (The initial value is true)

titlesize (Float) <UDPACK>

The character height of the message printed in the bottom margin of the graph. (Units in VC; The initial value is undefined.) When this internal variable is undefined, the internal variable 'rsizel1' handled by Axis::Lin is inquired.

xttl (Float) <UDPACK>

An internal variable which determines the position of the message printed in the bottom margin of the graph. Takes a floating-point value between -1 to +1. Left-aligned when -1, centered when 0, and right-aligned when +1. (The initial value is 0.).

labelfmt (String) <UDPACK::UDSFMT>

Specifies the format of the contour label. For example, when you wish to make all contour labels integer types, then

Contour.labelfmt = '(I8)'.

(Since the characters are left aligned, the result is the same for example, with '(I12)', if the label is shorter than 8 characters. The initial value is the option 'D' (an expression 4-to-5-characters long when the number of significant digits is 3), interpreted by the subroutine <tt>CHVAL</tt> (see section on FMTLIB in the user's manual for "MISC1").

iundef (Fixnum) <SYSLIB>

Integer-type value indicating 'not specified'. (Initial value: -999)

rundef (Float) <SYSLIB>

Floating-point-number-type value indicating 'not specified'. (Initial value: -999.0)

lmiss (true or false) <SYSLIB>

Specifies whether missing-value handling will be performed. Performed when true, and not performed when false (Initial value: false).

imiss (Fixnum) <SYSLIB>

Specifies the integer-type missing value for missing-value handling. (Initial value: 999)

rmiss (Float) <SYSLIB>

Specifies the floating-point-number-type missing value for missing-value handling. (Initial value: 999.0)

In addition, These parameters can be used as methods. For example, it is possible to refer the parameter "xttl" with Contour.xttl method. Moreover, it is possible to set the parameter "xttl" with Contour.xttl= method.

Contour.set(key, val)

Sets parameters. If val is nil, the value of the parameter will return default value in DCL.

Arguments

Example

Box.set("xttl", 3)      # the position of the message Left-aligned

Contour.get(key)

Refers the value of the parameter.

Arguments

Example

Contour.get("xttl")      # Sees the position of the message

Contour.reset(key)

Sets the value of the parameter default value.

Arguments

Example

Box.reset("xttl")      # Sets the position of the message a default position.

Contour.help_params

Refers available parameters in Contour module.

Arguments None

Notes

  1. This method return name of the parameter, present value, type of the parameter.

Contour.sync

Synchronizes the value of a parameter in DCL with the present value of the parameter in AdvancedDCL.

Arguments

None

Notes

In AdvancedDCL, parameters which set with "set" method do not synchronize with DCL and a method to synchronize parameters is called in drawing methods. This method is used to synchronize parameters with these of DCL directly.

Contour.gcla(max, min, dx)

Sets the value of the contour level used by Contour.draw by the minimum & maximum values and step size, or by the number of levels.

Arguments

Notes

  1. UDGCLA is called in this method.
  2. Must be XMIN != XMAX.
  3. The contour level is set as the step size specified by DX multiplied by an integer factor.
  4. The labels for the contours are generated by the subroutine UDLABL. The format used in this case can be inquired/changed using the parameter 'labelfmt'
  5. There are 2 types of contours; the major line and the minor line. The major line is a labeled contour, and the minor line is not labeled. (However, by setting the internal variable 'label' to false, the major lines will also have no labels. The initial value is true) The line index of the major line is specified by the internal variable 'indexmj'. (The initial value is 3.) The character height for the label of the major line is specified by the internal variable 'rsizel'. (Units in values of VC; the initial value is undefined. Here, RSIZEL inquires the internal variable 'rsizel1' handled by Axis::Lin.) The line index of the minor line is specified by the internal variable 'indexmn'. (The initial value is 1.)
  6. When the internal variable 'ldash' is true, the contour lines with negative contour levels are drawn using the line type of the inquired internal variable 'idash'. (The initial value of 'ldash' is true; the initial value of 'idash' is 3: dashed lines.) All other contour lines are drawn with line types of the inquired internal variable 'isolid'. (The initial value of 'isolid' is 1: solid line.)
  7. The number of minor line between two major lines is specified by the internal variable 'icycle'. (The initial value is 2.) In other words, one major line is drawn for a cycle of contours specified by the inquired value of 'icycle', and the remaining contours in the cycle are minor lines. The contour levels of the major line is set as the step size specified by DX multiplied by the factor 'icycle'.

Contour.gclb(z, dx)

Sets the value of the contour level used by Contour.draw with an array giving the grid-point values and the step size or the approximate number of levels. Arguments

Notes

  1. UDGCLB is called in this method.
  2. This routine checks the minimum and maximum values of the grid-point values for array Z, and calls Contour.gcla internally.

Contour.sclv(zlev, index, itype, clv, hl)

Specifies all of the attributes for a contour line and sets a single contour level.

Arguments

備考

  1. UDSCLV is called in this method.
  2. Contour.gcla and Contour.gclb call this routine internally. When you wish to draw auxiliary lines, call Contour.gcla and Contour.gclb before calling this routine to add an extra contour level.
  3. The length of the label (CLV) must be shorter than 8.
  4. The number of contour levels currently set can be inquired with

    Contour.levelget .

Contour.dclv(zlev)

Deletes a contour level.

Arguments

Notes

  1. UDDCLV is called in this method.
  2. Call this routine when you wish to delete a specific contour level specified beforehand using Contour.gcla and Contour.gclb.

Contour.iclv

Clears a contour level set using Contour.gcla, Contour.gclb and Contour.sclv.

Arguments None

Notes

  1. UDICLV is called in this method.
  2. This routine must be called when you wish to clear the contour levels set beforehand by Contour.gcla, Contour.gclb, and Contour.sclv.

Contour.intervalget(nlev)

Determines the interval of the contour level set by Contour.gcla, Contour.gclb, and Contour.sclv.

Arguments

Notes

  1. RUDLEV is called in this method.
  2. Internally, the values of the (NLEV)th and (NLEV+1)th contour levels are checked by UDQCLV, and the difference (the (NLEV+1)th value minus the (NLEV)th value) is returned. Note that the values of the contour levels inquired by UDQCLV are not necessarily in ascending order.
  3. Two or more contour levels must be set. Also, NLEV must be larger than 1 and smaller than the total number of contour levels set. When this condition is not satisfied, RUDVAL gives an alert message and 0 is returned.

Contour.levelget

Return specified attributes of contour levels.

Arguments None

Notes

  1. Return an obejct of [[zlev, index, itype, clv, hl], [zlev, ... ], ...].

Contour.draw(data, x=nil, y=nil, temp=nil)

Draws a 2-D contour graph (using a work area provided internally).

Arguments

Notes

  1. UDCNTZ is called in this method.
  2. 格子点の間隔が不等間隔の場合、引数としてx, yを与えてやると自動的に格子点を設定する。
  3. When the window is not specified, the window is specified from x and y if they are specified, and window is specified from the shape of data if they are not specified.
  4. If the value of the contour level is not set by Contour.gcla, Contour.gclb, or Contour.sclv, then the following subroutine is called internally to set approximately NLEV contour levels.

    Contour.gclb(z, -(nlev))

    NLEV is the value inquired by the internal variable 'nlev' handled by the Contour module. (The initial value is 12.).

  5. From restrictions for algorithms for drawing a contour, the values of the grid points must not be equal to any value of the contour level. If such a grid-point value exists, a minute correction is made internally (and a message is printed to indicate that a correction had been made.)
  6. Missing-value handling is performed when the internal variable 'lmiss' handled by the Fig module is true (The missing value inquired in this case is the internal variable 'rmiss' handled by the Fig module.) When false, missing-value handling is not performed.
  7. Before contouring, all grid-point values are checked. In the following 2 cases, contouring is not performed, and a message is printed. Furthermore, when the internal variable 'lmsg' is true, then a message is also printed in the bottom margin. When false, the message is not printed. (The initial value is true.) The 2 cases are:

    • when all grid points are missing values (a missing field)
    • when all grid points have the same value (a constant field).
  8. When the internal variable 'lmsg' is true and there are more than 2 contours to draw, the floating-point function Contour.intervalget(1) is called to print the difference (CZL2-CZL1) between contour level one (CZL1) and contour level 2 (CZL2) in the bottom margin of the graph. These messages are written using the information handled by the Axis::Lin module when a transformation other than the map projection transformation is set. Therefore, in a case such as this, the coordinate axes should be plotted before a call is made to Contour.draw. On the other hand, when the map projection transformation is specified, then the message is printed at the center of the bottom margin.

NumRu::AdvancedDCL::Arrow

About this module

Arrow module is for the arrow sub-primitives.

Parameters

Name Type DCL package

lprop(true or false)<SGPACK>

Specifies whether the lines in the arrowhead is drawn proportional to the length of the arrow axis. When <TT>.TRUE.</TT>, the lines are proportional; when <TT>.FALSE.</TT>, the lines are drawn at the constant value specified by the internal variable <TT>const</TT>, in a map projection, the lines are drawn at the constant specified by the internal variable <TT>constm</TT>. (Initial value: <TT>.TRUE.</TT>).

luarw(true or false)<SGPACK>

In a map projection, specifies whether the arrowhead is drawn fixed to the map. When <TT>.TRUE.</TT>, the arrowhead is fixed to the map; when <TT>.FALSE.</TT>, is drawn in VC. (Initial value: <TT>.TRUE.</TT>)

afact(Float)<SGPACK>

The proportionality factor used when <TT>lprop</TT> is <TT>.TRUE.</TT> (drawn proportionately) (Initial value: 0.33)

const(Float)<SGPACK>

The constant value used when <tt>lprop</tt> is <tt>.FALSE.</tt> (drawn at a fixed value) (Unit is <tt>VC</tt>; Initial value: 0.01)

constm(Float)<SGPACK>

The constant value used in a map projection when <TT>lprop</TT> is <TT>.FALSE. </TT>(drawn at a fixed value) (Unit is radians ;Initial value: 5.0)

angle(Float)<SGPACK>

The angle between the arrowhead and the arrow axis. (Unit is degrees; Initial value: 20.0)

latone(true or false)<SGPACK>

Specifies whether the triangular area of the arrowhead is filled solid. Filled when <TT>.TRUE.</TT>; Not filled when <TT>.FALSE.</TT>. (Initial value: <TT>.FALSE.</TT>)

iatone(Fixnum)<SGPACK>

The tone pattern for filling the triangular area of the arrowhead. (Initial value: 999) When the value is smaller than a 3-digit number, the color index specified for the axis will be used.

arrowtype(Fixnum)<SGPACK::SGSLAT>

The type of line drawn. This must have a value other than 0. When the value is 0, a message is printed, and no other steps are taken.

arrowindex(Fixnum)<SGPACK::SGSLAI>

The line index of a line segment. A value must be larger than 1. When the value is 0, a message is printed, and no other steps are taken.

rundef (float) <SYSLIB>

Floating-point-number-type value indicating 'not specified'. (Initial value: -999.0)

iundef (Fixnum) <SYSLIB>

Integer-type value indicating 'not specified'. (Initial value: -999)

lmiss (true or false) <SYSLIB>

Specifies whether missing-value handling will be performed. Performed when true, and not performed when false. (Initial value: false).

imiss (Fixnum) <SYSLIB>

Specifies the integer-type missing value for missing-value handling. (Initial value: 999)

rmiss (Float) <SYSLIB>

Specifies the floating-point-number-type missing value for missing-value handling. (Initial value: 999.0)

In addition, These parameters can be used as methods. For example, it is possible to refer the parameter "lprop" with Arrow.lprop method. Moreover, it is possible to set the parameter "lprop" with Arrow.lprop= method.

Arrow.set(key, val)

Sets parameters. If val is nil, the value of the parameter will return default value in DCL.

Arguments

Example

Arrow.set("arrowindex", 3)      # Sets the arrow index 3.

Arrow.get(key)

Refers the value of the parameter.

Arguments

Example

Arrow.get("arrowindex")      # Refers the arrow index.

Arrow.reset(key)

Sets the value of the parameter default value.

Arguments

Example

Arrow.reset("arrowindex")      # Sets the arrow index a default value.

Arrow.help_params

Refers available parameters in Arrow module.

Arguments None

Notes

  1. This method return name of the parameter, present value, type of the parameter.

Arrow.sync

Synchronizes the value of a parameter in DCL with the present value of the parameter in AdvancedDCL.

Arguments

None

Notes

In AdvancedDCL, parameters which set with "set" method do not synchronize with DCL and a method to synchronize parameters is called in drawing methods. This method is used to synchronize parameters with these of DCL directly.

Arrow.draw(x1, y1, x2, y2, temp=nil)

Draws a line segment with an arrowhead in the U-coordinates.

Arguments

Notes

  1. SGLAU is called in this method.

Arrow.vdraw(x1, y1, x2, y2, temp=nil)

Draws a line segment with an arrowhead in the V-coordinates.

Arguments

Notes

  1. SGLAV is called in this method.

Arrow.rdraw(x1, y1, x2, y2, temp=nil)

Draws a line segment with an arrowhead in the R-coordinates.

Arguments

Notes

  1. SGLAR is called in this method.

NumRu::AdvancedDCL::Bar

About this module

This is the module for drawing bar graphs. An abstract is same as ((<AdvancedDCL::Plot>)).

Parameters

Name Type DCL package

frtype(Numeric)<UUPACK::UUSFRT>

Specifies the line type of a frame. Specified attributes are used in Bar.frame,Box.frame methods.

frindex(Numeric)<UUPACK::UUSFRI>

Specifies the line index of a frame. Specified attributes are used in Bar.frame,Box.frame methods.

barwidth(Numeric)<UUPACK::UUSBRS>

Specifies the horizontal width of a bar graph.

lineindex(Numeric)<UUPACK::UUSLNI>

Specifies the line index of a polyline

linetype(Numeric)<UUPACK::UUSLNT>

Specifies the line type of a polyline

variablerange(Array[2, Numeric])<UUPACK::UUSIDV>

Specifies the defined range of the independent variable.

uref(Float)<UUPACK>

When the dependent variable is RUNDEF, the value of the internal variable uref (initial value = 0) is considered as specified.

itpat(Array[2, Numeric])<UUPACK::UUSARP>

Specifies the tone pattern for filling the internal area. The number set here is used by Gap.tone, Bar.tone, Box.tone.

iundef (Fixnum) <SYSLIB>

Integer-type value indicating 'not specified'. (Initial value: -999)

rundef (Float) <SYSLIB>

Floating-point-number-type value indicating 'not specified'. (Initial value: -999.0)

lmiss (true or false) <SYSLIB>

Specifies whether missing-value handling will be performed. Performed when true, and not performed when false (Initial value: false).

imiss (Fixnum) <SYSLIB>

Specifies the integer-type missing value for missing-value handling. (Initial value: 999)

rmiss (Float) <SYSLIB>

Specifies the floating-point-number-type missing value for missing-value handling. (Initial value: 999.0)

Array[2, Float] represents a float Array object whose length is 2.

In addition, These parameters can be used as methods. For example, it is possible to refer the parameter "frtype" with Bar.frtype method. Moreover, it is possible to set the parameter "frtype" with Bar.frtype= method.

Bar.set(key, val)

Sets parameters. If val is nil, the value of the parameter will return default value in DCL.

Arguments

Example

Bar.set("frindex", 3)      # Sets the line index of a frame 3.

Bar.get(key)

Refers the value of the parameter.

Arguments

Example

Bar.get("frindex")      # Refers the line index of a frame.

Bar.reset(key)

Sets the value of the parameter default value.

Arguments

Example

Bar.reset("frindex")      # Sets the line index of a frame a default value.

Bar.help_params

Refers available parameters in Bar module.

Arguments None

Notes

  1. This method return name of the parameter, present value, type of the parameter.

Bar.sync

Synchronizes the value of a parameter in DCL with the present value of the parameter in AdvancedDCL.

Arguments

None

Notes

In AdvancedDCL, parameters which set with "set" method do not synchronize with DCL and a method to synchronize parameters is called in drawing methods. This method is used to synchronize parameters with these of DCL directly.

Bar.yfrm(x1, x2, y, temp=nil)

Draws bar graphs as Y is an independent variable.

Arguments

Notes

  1. UHBRF is called in this method.
  2. When RUNDEF is specified as Y, it is
considered that the points dividing the range defined by the parameter 'variablerange' into N-1 equal sections have been specified. If the defined range is not specified, then the whole window is considered to be the defined range.
  (3)When RUNDEF is specified as X1 or X2, it is considered that the value of the internal variable 'uref' has been specified. The initial value of 'uref' is 0.
  (4)The attributes of the frame drawn by Bar.xfrm, Bar.yfrm are specified by the parameters 'frtype' and 'frindex'. The width of the bar is specified by the parameter 'barwidth'.

Bar.xfrm(x, y1, y2, temp=nil)

Draws bar graphs as X is an independent variable.

Arguments

Notes

  1. UVBRF is called in this method.
  2. When RUNDEF is specified as X, it is
considered that the points dividing the range defined by the parameter 'variablerange' into N-1 equal sections have been specified. If the defined range is not specified, then the whole window is considered to be the defined range.
  (3)When RUNDEF is specified as Y1 or Y2, it is considered that the value of the internal variable 'uref' has been specified. The initial value of 'uref' is 0.
  (4)The attributes of the frame drawn by Bar.xfrm, Bar.yfrm are specified by the parameters 'frtype' and 'frindex'. The width of the bar is specified by the parameter 'barwidth'.

Bar.ytone(x1, x2, y, temp=nil)

Fills in the interior of a bar graph.

Arguments

Notes

  1. UVBRA is called in this method.
  2. When RUNDEF is specified as Y, it is considered that the points dividing the range defined by the parameter 'variablerange' into N-1 equal sections have been specified. If the defined range is not specified, then the whole window is considered to be the defined range.
  3. When RUNDEF is specified as X1 or X2, it is considered that the value of the internal variable 'uref' has been specified. The initial value of 'uref' is 0.
  4. The tone pattern used for fill by Bar.xtone, Bar.ytone is specified by the parameter 'tpat'. The width of a bar is specified by the parameter 'barwidth'.

Bar.xtone(x, y1, y2, temp=nil)

Fills in the interior of a bar graph.

Arguments

Notes

  1. UHBRA is called in this method.
  2. When RUNDEF is specified as X, it is considered that the points dividing the range defined by the parameter 'variablerange' into N-1 equal sections have been specified. If the defined range is not specified, then the whole window is considered to be the defined range.
  3. When RUNDEF is specified as Y1 or Y2, it is considered that the value of the internal variable 'uref' has been specified. The initial value of 'uref' is 0.
  4. The tone pattern used for fill by Bar.xtone, Bar.ytone is specified by the parameter 'tpat'. The width of a bar is specified by the parameter 'barwidth'.

Bar.yline(xd, y, temp=nil)

Connects bar graphs with lines.

Arguments

Notes

  1. UVBRL is called in this method.
  2. When RUNDEF is specified as Y, it is considered that the points dividing the range defined by the parameter 'variablerange' into N-1 equal sections have been specified. If the defined range is not specified, then the whole window is considered to be the defined range.
  3. When RUNDEF is specified as X1 or X2, it is considered that the value of the internal variable 'uref' has been specified. The initial value of 'uref' is 0.
  4. The attributes of the line drawn are specified by the parameters 'frype' and 'frindex' respectively. The width of a bar is specified by the parameter 'barwidth'.

Bar.xline(x, yd, temp=nil)

Connects bar graphs with lines.

Arguments

Notes

  1. UHBRL is called in this method.
  2. When RUNDEF is specified as X, it is considered that the points dividing the range defined by the parameter 'variablerange' into N-1 equal sections have been specified. If the defined range is not specified, then the whole window is considered to be the defined range.
  3. When RUNDEF is specified as Y1 or Y2, it is considered that the value of the internal variable 'uref' has been specified. The initial value of 'uref' is 0.
  4. The attributes of the line drawn are specified by the parameters 'frype' and 'frindex' respectively. The width of a bar is specified by the parameter 'barwidth'.

NumRu::AdvancedDCL::Box

About this module

This is the module for drawing box graphs. An abstract is same as ((<AdvancedDCL::Plot>)).

Parameters

Name Type DCL package

frtype(Numeric)<UUPACK::UUSFRT>

Specifies the line type of a frame. Specified attributes are used in Bar.frame,Box.frame methods.

frindex(Numeric)<UUPACK::UUSFRI>

Specifies the line index of a frame. Specified attributes are used in Bar.frame,Box.frame methods.

lineindex(Numeric)<UUPACK::UUSLNI>

Specifies the line index of a polyline

linetype(Numeric)<UUPACK::UUSLNT>

Specifies the line type of a polyline

variablerange(Array[2, Numeric])<UUPACK::UUSIDV>

Specifies the defined range of the independent variable.

uref(Float)<UUPACK>

When the dependent variable is RUNDEF, the value of the internal variable uref (initial value = 0) is considered as specified.

itpat(Array[2, Numeric])<UUPACK::UUSARP>

Specifies the tone pattern for filling the internal area. The number set here is used by Gap.tone, Bar.tone, Box.tone.

iundef (Fixnum) <SYSLIB>

Integer-type value indicating 'not specified'. (Initial value: -999)

rundef (Float) <SYSLIB>

Floating-point-number-type value indicating 'not specified'. (Initial value: -999.0)

lmiss (true or false) <SYSLIB>

Specifies whether missing-value handling will be performed. Performed when true, and not performed when false (Initial value: false).

imiss (Fixnum) <SYSLIB>

Specifies the integer-type missing value for missing-value handling. (Initial value: 999)

rmiss (Float) <SYSLIB>

Specifies the floating-point-number-type missing value for missing-value handling. (Initial value: 999.0)

Array[2, Float] represents a float Array object whose length is 2.

In addition, These parameters can be used as methods. For example, it is possible to refer the parameter "frtype" with Box.frtype method. Moreover, it is possible to set the parameter "frtype" with Box.frtype= method.

Box.set(key, val)

Sets parameters. If val is nil, the value of the parameter will return default value in DCL.

Arguments

Example

Box.set("frindex", 3)      # Sets the line index of a frame 3.

Box.get(key)

Refers the value of the parameter.

Arguments

Example

Box.get("frindex")      # Refers the line index of a frame.

Box.reset(key)

Sets the value of the parameter default value.

Arguments

Example

Box.reset("frindex")      # Sets the line index of a frame a default value.

Box.help_params

Refers available parameters in Box module.

Arguments None

Notes

  1. This method return name of the parameter, present value, type of the parameter.

Box.sync

Synchronizes the value of a parameter in DCL with the present value of the parameter in AdvancedDCL.

Arguments

None

Notes

In AdvancedDCL, parameters which set with "set" method do not synchronize with DCL and a method to synchronize parameters is called in drawing methods. This method is used to synchronize parameters with these of DCL directly.

Box.yfrm(x1, x2, y, temp=nil)

Draws box graphs as Y is an independent variable.

Arguments

Notes

  1. UHBXF is called in this method.
  2. When RUNDEF is specified as Y, it is
considered that the points dividing the range defined by the parameter 'variablerange' into N-1 equal sections have been specified. If the defined range is not specified, then the whole window is considered to be the defined range.
  (3)When RUNDEF is specified as X1 or X2, it is considered that the value of the internal variable 'uref' has been specified. The initial value of 'uref' is 0.
  (4)The attributes of the frame drawn by Bar.xfrm, Bar.yfrm are specified by the parameters 'frtype' and 'frindex'.

Box.xfrm(x, y1, y2, temp=nil)

Draws box graphs as X is an independent variable.

Arguments

Notes

  1. UVBXF is called in this method.
  2. When RUNDEF is specified as X, it is
considered that the points dividing the range defined by the parameter 'variablerange' into N-1 equal sections have been specified. If the defined range is not specified, then the whole window is considered to be the defined range.
  (3)When RUNDEF is specified as Y1 or Y2, it is considered that the value of the internal variable 'uref' has been specified. The initial value of 'uref' is 0.
  (4)The attributes of the frame drawn by Bar.xfrm, Bar.yfrm are specified by the parameters 'frtype' and 'frindex'. 

Box.ytone(x1, x2, y, temp=nil)

Fills in the interior of a box graph.

Arguments

Notes

  1. UVBXA is called in this method.
  2. When RUNDEF is specified as Y, it is considered that the points dividing the range defined by the parameter 'variablerange' into N-1 equal sections have been specified. If the defined range is not specified, then the whole window is considered to be the defined range.
  3. When RUNDEF is specified as X1 or X2, it is considered that the value of the internal variable 'uref' has been specified. The initial value of 'uref' is 0.
  4. The tone pattern used for fill by Bar.xtone, Bar.ytone is specified by the parameter 'tpat'.

Box.xtone(x, y1, y2, temp=nil)

Fills in the interior of a box graph.

Arguments

Notes

  1. UHBXA is called in this method.
  2. When RUNDEF is specified as X, it is considered that the points dividing the range defined by the parameter 'variablerange' into N-1 equal sections have been specified. If the defined range is not specified, then the whole window is considered to be the defined range.
  3. When RUNDEF is specified as Y1 or Y2, it is considered that the value of the internal variable 'uref' has been specified. The initial value of 'uref' is 0.
  4. The tone pattern used for fill by Bar.xtone, Bar.ytone is specified by the parameter 'tpat'.

Box.yline(xd, y, temp=nil)

Connects box graphs with lines.

Arguments

Notes

  1. UVBXL is called in this method.
  2. When RUNDEF is specified as Y, it is considered that the points dividing the range defined by the parameter 'variablerange' into N-1 equal sections have been specified. If the defined range is not specified, then the whole window is considered to be the defined range.
  3. When RUNDEF is specified as X1 or X2, it is considered that the value of the internal variable 'uref' has been specified. The initial value of 'uref' is 0.
  4. The attributes of the line drawn are specified by the parameters 'frype' and 'frindex' respectively.

Box.xline(x, yd, temp=nil)

Connects box graphs with lines.

Arguments

Notes

  1. UHBXL is called in this method.
  2. When RUNDEF is specified as X, it is considered that the points dividing the range defined by the parameter 'variablerange' into N-1 equal sections have been specified. If the defined range is not specified, then the whole window is considered to be the defined range.
  3. When RUNDEF is specified as Y1 or Y2, it is considered that the value of the internal variable 'uref' has been specified. The initial value of 'uref' is 0.
  4. The attributes of the line drawn are specified by the parameters 'frype' and 'frindex' respectively.