Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > ed05dc5f357c49fdded780f52b150dce > files > 14

ploticus-2.41-2mdv2010.0.i586.rpm

<html>
<head>
<!-- This file has been generated by unroff 1.0, 03/11/09 12:56:11. -->
<!-- Do not edit! -->
<STYLE TYPE="text/css">
<!--
        A:link{text-decoration:none}
        A:visited{text-decoration:none}
        A:active{text-decoration:none}
        OL,UL,P,BODY,TD,TR,TH,FORM { font-family: arial,helvetica,sans-serif;; font-size:small; color: #333333; }

        H1 { font-size: x-large; font-family: arial,helvetica,sans-serif; }
        H2 { font-size: large; font-family: arial,helvetica,sans-serif; }
        H3 { font-size: medium; font-family: arial,helvetica,sans-serif; }
        H4 { font-size: small; font-family: arial,helvetica,sans-serif; }
-->
</STYLE>
<title>ploticus: proc areadef</title>
<body bgcolor=D0D0EE vlink=0000FF>
<br>
<br>
<center>
<table cellpadding=2 bgcolor=FFFFFF width=550><tr>
<td>
  <table cellpadding=2 width=550><tr>
  <td><br><h2>proc areadef</h2></td>
  <td align=right>
  <small>
  <a href="../doc/welcome.html"><img src="../doc/ploticus.gif" border=0></a><br>
  Version 2.41 Mar2009
     </small><br><a href="../doc/scripthome.html">Scripts</a>
  <td></tr></table>
</td></tr>
<td>
<br>
<br>

<title>Manual page for proc_areadef(PL)</title>
</head>
<body>

<b>proc areadef</b> defines a rectangular area where subsequent scaled plotting will take place.<tt> </tt>
The size, location of the rectangle are specified, and the
scaling method and range of both X and Y are defined here.<tt> </tt>
<b>proc areadef</b> may be used any number of times within the same script
to do multiple plots per page, to produce multiple page results, or to 
overlay different scales or units on the same plot, but only one plotting
area and scale system is in effect at any one time (referred to as the "current plotting area").<tt> </tt>
<p>
Various scaling types, including linear, log, date, time and category are available for X and Y.  
The
<a href="autorange.html">
 xautorange and yautorange attributes
</a>
can be used to perform automatic axis scaling based on the data.<tt> </tt>
<a href="#clickmap">
 Clickmap and mouseover support
</a>
is available for the plotting area grid or as a whole.<tt> </tt>


<br><br><br>

<h2>Attributes</h2>
The range in X and Y <b>must</b> be specified, either using
<tt>xrange</tt> / <tt>yrange</tt>, or
<tt>xautorange</tt> / <tt>yautorange</tt>.<tt> </tt>
If nothing else is specified,
default behaviour is for the <tt>standard</tt>
plotting area to be used, with linear scaling in x and y.<tt> </tt>

<br><br><br>

<h2>Location &amp; size of the plotting rectangle</h2>
The size and location of the plotting area
on a page (the plotting area) may be specified in one 
of these three ways: 
<dl>
<dt> <dd>
- by specifying a rectangle (two points) using the <tt>rectangle</tt> attribute;
<dt> <dd>
- by specifying plotting area size using
the <tt>box</tt> attribute and the location using the <tt>location</tt> attribute.<tt> </tt>
<dt> <dd>
- by name using the <tt>areaname</tt> attribute;
</dl>
<p>
You can also make the plot area size vary automatically based on how much data you are plotting
(<tt>autowidth</tt> and <tt>autoheight</tt>).<tt> </tt>

<br><br>

<p>
<b>rectangle</b>  
&nbsp; &nbsp;
<i>x1 y1 x2 y2</i>
<dl>
<dt> <dd>
Allows a plotting area to be defined by giving two points:
(x1,y1) is the lower left corner 
and (x2,y2) is the upper right corner 
(both are in 
<a href="attributetypes.html#positionunits">
 absolute units).<tt> </tt>
</a>
<br>
Example: <tt>rectangle: 1.4 4 7.4 8</tt>

<br><br>

</dl>
<p>
<b>box</b>  
&nbsp; &nbsp;
<i>width height</i> 
<dl>
<dt> <dd>
Allows a plotting area to be defined by giving width and height in 
<a href="attributetypes.html#positionunits">
 absolute units.<tt> </tt>
</a>
A <b>location</b> attribute should also be given to
specify where to place the box.<tt> </tt>
<br>
Example: <tt>box: 1.4 4</tt>

<br><br>

</dl>
<p>
<b>location</b> 
&nbsp; &nbsp;
<a href="attributetypes.html#xy">
 x y
</a>
<dl>
<dt> <dd>
Used with the <b>box</b> attribute.  
Defines the location of the lower-left corner of the plotting area.<tt> </tt>

<br><br>

</dl>
<p>
<b>areaname</b>  
&nbsp; &nbsp;
<i>name</i> 
<dl>
<dt> <dd>
Allows a plotting area to be defined by selecting a 
predefined rectangle by 
<a href="#areanames">
 name.<tt> </tt>
</a>
These are most useful when generating plots on standard paper.<tt> </tt>
<br>
Example: <tt>areaname: 2hi</tt>

<br><br>

</dl>
<p>
<b>autowidth</b>  
&nbsp; &nbsp;
<i>f</i>  
&nbsp; &nbsp;
[<i>minallowablesize  maxallowablesize  [align=right]</i>]
<dl>
<dt> <dd>
If specified, the width of the plotting area will be influenced by the data range in X.<tt> </tt>
For example, you would probably want to display 8 categories using a smaller plot
area than 48 categories.<tt> </tt>
<tt>autowidth</tt> allows this to be done automatically, driven by the data.<tt> </tt>
You must fully specify the plotting area using <tt>rectangle</tt> or some other attribute(s),
and specify the scaling in X.<tt> </tt>
This attribute then revises the width of the plotting area by setting it
to <i>f</i> times the number of basic units in the range of X, in absolute units.<tt> </tt>
You can optionally set a <i>minallowablesize</i> and a <i>maxallowablesize</i> (both in absolute units)
that the plot will never be smaller than, or larger than, respectively.<tt> </tt>
For example:
<pre>
   #proc areadef
      rectangle: 1 1 6 3
      xcategories: datafield=2
      autowidth: 0.3  3.0  8.0
</pre>
For example, if there are 12 categories represented in your data, 12 x 0.3 = 3.6, so the resulting
plotting area would be 3.6 inches wide.<tt> </tt>
If there are 20 categories, 20 x 0.3 = 6.0, and the resulting
plotting area would be 6.0 inches wide.<tt> </tt>
If there are only six categories, the resulting plot would have been 1.8 inches wide,
however a minimum allowable size of 3.0 inches was specified, so the plot will be 3 inches wide.<tt> </tt>
If there are 40 categories, the resulting plot would have been 12 inches wide,
however a maximum allowable size of 8.0 inches was specified, so the plot will be 8 inches wide.<tt> </tt>
<dt> <dd>
<tt>align=right</tt> (new in 2.40) fixes the right side of the plot, with width adjustments affecting the left side 
(but be sure that <i>maxallowablesize</i> doesn't force the left side into negative space).<tt> </tt>
<dt> <dd>
Remember that with date and datetime scaling the basic unit is the day, and with time
scaling the basic unit is the minute.<tt> </tt>

<br><br>

</dl>
<p>
<b>autoheight</b>  
&nbsp; &nbsp;
<i>f</i>
&nbsp; &nbsp;
[<i>minallowablesize  maxallowablesize  [valign=top]</i>]
<dl>
<dt> <dd>
Allows the height of the plotting area to be determined by the data range in Y.<tt> </tt>
Works similarly to <tt>autowidth</tt> above.<tt> </tt>

<br><br>
</dl>
<p>
<b>catbinsadjust</b>
&nbsp; &nbsp;
<tt> 1 | 0</tt>
<dl>
<dt> <dd>
If using category scaling where the categories are centered (shifted such that the first is at 0.5, the second at 1.5, etc.)
this attribute may be specified as 1 to eliminate the extra space in the plotting area near the maxima.  (New in 2.41)

<br><br><br>

</dl>
<h2>Scaling method &amp; range in X and Y</h2>

<p>
<b>xscaletype</b>  
&nbsp; &nbsp;
<i>type</i> 
&nbsp; &nbsp;
[<i>format</i>]
<dl>
<dt> <dd>
Defines the type of scaling that will be in effect for the X axis.  
Supported <i>types</i> include:
<br>
<pre>
scaletype      description
----------     ------------------------------------------
linear         the default; continuous linear
log log+1      logarithmic scaling
date           scaling based on date values, usually in X
time           scaling based on time values, usually in X
datetime       for plotting time values over several days
categories     bins for categorical data.  
</pre>
<dt><dd><p>
The <i>format</i> parameter may be given with
<tt>date</tt>, <tt>time</tt>, or <tt>datetime</tt>, to set the default date/time notation.  See 
<a href="scaleunits.html">
 scaleunits
</a>
for discussion of the various scale types and units, and the
<a href="../gallery/gall.sa.html">
 gallery scale &amp; axis examples.<tt> </tt>
</a>
<dt><dd><p>
<tt>xrange</tt> or <tt>xautorange</tt> will also need to be specified.<tt> </tt>
For <tt>categories</tt>, a set of categories must be already defined using
<a href="categories.html">
 proc categories
</a>
or using the equivalent 
<a href="#categories">
 proc areadef categories attributes.<tt> </tt>
</a>
<dt><dd><p>
Example: <tt>xscaletype: date yymm</tt>
<br>
Example: <tt>xscaletype: datetime mm/dd/yyyy.hh:mm</tt>
<br>
Example: <tt>xscaletype: categories</tt>

<br><br>

</dl>
<p>
<b>yscaletype</b>  
&nbsp; &nbsp;
<i>type</i>  
&nbsp; &nbsp;
[<i>format</i>]
<dl>
<dt> <dd>
Defines the type of scaling for the Y axis.  
Same syntax as <tt>xscaletype</tt> above.<tt> </tt>
Default is <tt>linear</tt>.<tt> </tt>

</dl>
<p>
Occasionally it is useful to revise the plotting units after the initial areadef has been done.<tt> </tt>
To do this, use the 
<a href="functions.html">
 $changeunits() function.<tt> </tt>
</a>

<br><br>

<p>
<b>xrange</b>  
&nbsp; &nbsp;
<i>min max</i> | <tt>categories</tt>
<dl>
<dt> <dd>
Defines the plottable range in x.  <i>min</i> and <i>max</i> must both be given,
and must both be plottable values with respect to <tt>xscaletype</tt>.<tt> </tt>
(To set a continuous range automatically using a data field, use <tt>xautorange</tt>.)
If <b>log</b> scaling is being used, 0.0 may not given as the minima (but a very small value like 0.01 is ok).<tt> </tt>
If date, time, log, categories, or other special type of scaling is to be done, 
<tt>xscaletype</tt> must be set appropriately.<tt> </tt>
If you want, you can specify <tt>categories</tt>, but this just has the same effect as 
setting the scaletype to <tt>categories</tt>.<tt> </tt>
<br>
Example: if your data ranges in x between
1.5 and 23.5 you might use: <tt>xrange: 0 24</tt>
<br>
Example: <tt>xrange: categories</tt>
<br>
Example: <tt>xrange: 01FEB2002 28FEB2002</tt>
<br>
Example: <tt>xrange: 01FEB2002.00:00 04FEB2002.24:00</tt>

<br><br>

</dl>
<p>
<b>xautorange</b> 
&nbsp; &nbsp;
<tt>datafield=</tt><i>dfields</i> .. other subattributes..<tt> </tt>
<dl>
<dt> <dd>
This may be used as an alternative to <tt>xrange</tt>, in order to automatically
find an appropriate range based on the data.  <i>dfields</i> are the data field(s) to be scanned.<tt> </tt>
This attribute has its own 
<a href="autorange.html">
 manual page.<tt> </tt>
</a>

<br><br>

</dl>
<p>
<b>yrange</b>  
&nbsp; &nbsp;
<i>min max</i>
<dl>
<dt> <dd>
Defines the plottable range in y.   See <tt>xrange</tt> above.<tt> </tt>

<br><br>

</dl>
<p>
<b>yautorange</b> 
&nbsp; &nbsp;
<tt>datafield=</tt><i>dfield</i> .. other subattributes..<tt> </tt>
<dl>
<dt> <dd>
This may be used as an alternative to <tt>yrange</tt>, in order to automatically
find an appropriate range based on the data.  Similar to <tt>xautorange</tt>.<tt> </tt>
This attribute has its own 
<a href="autorange.html">
 manual page.<tt> </tt>
</a>



<a name=categories></a>

<br><br><br>

</dl>
<h2>Categories</h2>
The old syntax for defining categories within proc areadef is set forth below.<tt> </tt>
This syntax is deprecated (support may be dropped in a future release).  New projects should use
<a href="categories.html">
 proc categories
</a>
which has additional capabilities and higher capacities.  

<p>
<b>xcategories</b> ..define a set of categories to be used in X.  

<p>
<b>ycategories</b> ..define a set of categories to be used in Y.  

<p>
<b>xextracategory</b> ..allows an extra X axis category to be added explicitly

<p>
<b>yextracategory</b> ..allows an extra Y axis category to be added explicitly

<p>
<b>catcompmethod</b> ..control the details of how category comparisons are done.<tt> </tt>



<br><br><br>

<h2>Axis generation</h2>
X and Y axes are generated by 
<a href="axis.html">
 proc axis
</a>
; however, axis attributes may be specified from within <b>proc areadef</b> 
as a convenience.  This usually involves adding a <tt>xaxis.</tt> or <tt>yaxis.</tt> prefix 
to the attribute name.  If axes are defined this way then the plotting area and axes can all be 
<a href="scriptsyntax.html">
 #clone'd
</a>
as a unit.<tt> </tt>

<br><br>

<p>
<b>xaxis.*</b>
<dl>
<dt> <dd>
<b>proc axis</b> attributes for the x axis.  Any <b>proc xaxis</b> attributes may be used
from within <b>proc areadef</b> as a convenience, by prefixing the name with <tt>xaxis.</tt>.<tt> </tt>
See 
<a href="axis.html">
 proc axis
</a>

<br><br>

</dl>
<p>
<b>yaxis.*</b>
<dl>
<dt> <dd>
<b>proc yaxis</b> options for the y axis.  Any <b>proc yaxis</b> attributes may be used
from within <b>proc areadef</b> as a convenience, by prefixing the name with <tt>yaxis.</tt>.<tt> </tt>
See
<a href="axis.html">
 proc axis
</a>

<br><br>

</dl>
<p>
<b>axisline</b>, <b>tic*</b>, <b>minortic*</b>
<dl>
<dt> <dd>
These <b>proc xaxis/yaxis</b> attributes may be defined within
<b>proc areadef</b> to control <b>both</b> axes.  
See
<a href="axis.html">
 proc axis
</a>

<br><br>
</dl>
<p>
Example:
<pre>
  #proc areadef
    xscaletype: date dd-Mmm-yyyy
    xrange: 01-Jun-2003 15-Jun-2003
    yrange: 0 100
    xaxis.label: Date
    xaxis.stubs: inc 3 day
    xaxis.stubformat: mm/dd
    yaxis.label: Percent occupied
    yaxis.stubs: inc
</pre>
    


<br><br><br>

<h2>Other attributes of the plotting area</h2>

<p>
<b>title</b> 
&nbsp; &nbsp;
<a href="attributetypes.html#text">
 text
</a>
<dl>
<dt> <dd>
Specifies a plot title (not a page title).  
Plot title will appear above the upper left corner
of the plotting area by default.<tt> </tt>
<br>
Example: <tt>title: Subgroup 24-C</tt>

<br><br>

</dl>
<p>
<b>titledetails</b> 
&nbsp; &nbsp;
<a href="textdetails.html">
 textdetails
</a>
<dl>
<dt> <dd>
Text details for the plot title.<tt> </tt>
<br>
Example: <tt>titledetails: align=R size=9 style=I</tt>

<br><br>

</dl>
<p>
<b>title2</b> 
&nbsp; &nbsp;
<a href="attributetypes.html#text">
 text
</a>
<dl>
<dt> <dd>
Allows a second title to be specified.  May be useful to create
a plot header on both left and right.<tt> </tt>

<br><br>

</dl>
<p>
<b>title2details</b> 
&nbsp; &nbsp;
<a href="textdetails.html">
 textdetails
</a>
<dl>
<dt> <dd>
Text details for the second plot title.<tt> </tt>

</dl>
<p>
<b>areacolor</b> 
&nbsp; &nbsp;
<a href="color.html">
 color
</a>
<dl>
<dt> <dd>
Causes the area background to be filled with <i>color</i>.<tt> </tt>
Example: <tt>areacolor: yellow</tt>

<br><br>

</dl>
<p>
<b>frame</b> 
&nbsp; &nbsp;
<a href="linedetails.html">
 linedetails
</a>
<tt> | no | yes | bevel</tt>
<dl>
<dt> <dd>
Specifies a box or frame around the plotting area.  
Options are: <tt>no</tt> (no frame), <tt>yes</tt> (do
a default line frame), <tt>bevel</tt> for a beveled gray frame,
or a line detail specification, 
which results in a frame made of lines with the given characteristics
(A <tt>bevel</tt> frame will probably clash with tics and stubs
unless these are positioned inward.)
<br>
Example 1: <tt>frame: none</tt>
<br>
Example 2: <tt>frame: color=red width=4.0</tt>
<br>
Example 3: <tt>frame: bevel</tt>

<br><br>

</dl>
<p>
<b>linebottom</b> 
&nbsp; &nbsp;
<a href="linedetails.html">
 linedetails
</a>
<dl>
<dt> <dd>
Specifies a line to be drawn along the bottom edge of the plotting
area.  This is just a line, not an X axis.<tt> </tt>
<br>
Example: <tt>linebottom: yes</tt>
<br>
Example: <tt>linebottom: none</tt>
<br>
Example: <tt>linebottom: width=0.5 color=green</tt>

<br><br>

</dl>
<p>
<b>lineside</b> 
&nbsp; &nbsp;
<a href="linedetails.html">
 linedetails
</a>
<dl>
<dt> <dd>
Same as <tt>linebottom</tt> but specifies a line to be drawn along
the left side.  This is just a line, not a Y axis.<tt> </tt>

<br><br><br>
<a name=clickmap></a>

</dl>
<h2>Clickmaps and mouseover</h2>

<p>
<b>clickmapurl</b>  
&nbsp; &nbsp;
<i>url template</i>
<dl>
<dt> <dd>
If a
<a href="clickmap.html">
 clickmap
</a>
is being generated, and the plotting area is being mapped as a grid,
this attribute must be specified to supply a URL template, into which
@@XVAL and/or @@YVAL will be substituted.  
You'll also need to set 
<a href="axis.html#clickmap">
 proc axis's clickmap attribute
</a>
to indicate whether the grid will be associated with one axis or both.<tt> </tt>
See also the
<a href="clickmap.html">
 clickmap page
</a>
for more details and examples.<tt> </tt>
<br>
Example: <tt>clickmapurl: http://abc.com/cgi-bin/details?x=@@XVAL&amp;y=@@YVAL</tt>
<dt><dd><p>
This attribute can also be used to make the entire plotting area one clickable region.<tt> </tt>
This will be done if niether @@XVAL nor @@YVAL are found in the template.<tt> </tt>

<br><br>

</dl>
<p>
<b>clickmaplabel</b> 
&nbsp; &nbsp;
<i>label</i>
<dl>
<dt> <dd>
If generating a
<a href="clickmap.html">
 client-side clickmap,
</a>
region encompassing the entire plotting area,
this specifies a mouseover text label.<tt> </tt>
<br>
Example: <tt>clickmaplabel: Animals tested without drug effect</tt>

</dl>
<p>
<b>clickmaplabeltext</b>
&nbsp; &nbsp;
<a href="attributetypes.html#text">
 multiline text
</a>
<dl>
<dt> <dd>
Same as <tt>clickmaplabel</tt> but multiline text.  Must be terminated with a blank line.<tt> </tt>

<br><br>

</dl>
<p>
<b>clickmapadjust</b>
&nbsp; &nbsp;
<i>x y</i>
<dl>
<dt> <dd>
Adjust (move) the entire clickmap grid by (<i>x, y</i>) in absolute units.  (New in 2.41)




<br><br><br>

</dl>
<h2>Variables set by proc areadef</h2>
Areadef will set the variables <b>AREALEFT</b>, <b>AREARIGHT</b>, 
<b>AREABOTTOM</b>, and <b>AREATOP</b>
to hold the locations of the plot area edges in 
<a href="attributetypes.html#positionunits">
absolute units
</a>
 . 
Also, <b>XMIN</b>, <b>XMAX</b>, <b>YMIN</b>, and <b>YMAX</b> are set to the
scaled space boundaries.<tt> </tt>


<a name=areanames></a>
<br><br><br>

<h2>Pre-defined plotting area names</h2>
Pre-defined plotting area names, used with the <tt>areaname:</tt> attribute, are:
<dl>
<dt> <dd>
<pre>
Name    	Description
--------	------------------------------
standard	the default
square		a square area
whole   	as much of the page as possible
2hi, 2lo	for two plots on a page, one above the other
2left, 2right	for two plots on a page, side by side
3hi, 3mid, 3lo	for three plots on a page
4ne, 4nw, 4se, 4sw	for four plots on a page (ne = northeast)
slide   	works well with slides generation
lifetab  	works well for life tables
</pre>
<tt></tt><br>
<br>
</td></tr>
<td align=right>
<a href="../doc/welcome.html">
<img src="../doc/ploticus.gif" border=0></a><br><small>data display engine &nbsp; <br>
<a href="../doc/Copyright.html">Copyright Steve Grubb</a>
<br>
<br>
<center>
<img src="../gallery/all.gif"> 
</center>
</td></tr>
</table>
<br>
<center>
<table><tr><td>
Ploticus is hosted at http://ploticus.sourceforge.net</td><td> &nbsp; </td><td>
<a href="http://sourceforge.net/projects/ploticus"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=38453&type=12" 
width="120" height="30" border="0" 
alt="Get ploticus data display engine at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a>
</td></tr></table>


</center>
</dl>
<p><hr>
Markup created by <em>unroff</em> 1.0,&#160;<tt> </tt>&#160;<tt> </tt>March 11, 2009.
</body>
</html>