Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 5764c67416561ab82b35afcf9c650e17 > files > 737

GMT-doc-4.5.2-1.fc13.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>4.13 Specifying pen attributes</TITLE>
<META NAME="description" CONTENT="4.13 Specifying pen attributes">
<META NAME="keywords" CONTENT="GMT_Docs">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="GMT_Docs.css">

<LINK REL="next" HREF="node66.html">
<LINK REL="previous" HREF="node64.html">
<LINK REL="up" HREF="node30.html">
<LINK REL="next" HREF="node66.html">
</HEAD>

<BODY  bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html3436"
  HREF="node66.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html3430"
  HREF="node30.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html3424"
  HREF="node64.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html3432"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html3434"
  HREF="node255.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html3437"
  HREF="node66.html">4.14 Specifying area fill</A>
<B> Up:</B> <A NAME="tex2html3431"
  HREF="node30.html">4. General features</A>
<B> Previous:</B> <A NAME="tex2html3425"
  HREF="node64.html">4.12 PostScript features</A>
 &nbsp; <B>  <A NAME="tex2html3433"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html3435"
  HREF="node255.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION0012130000000000000000">
4.13 Specifying pen attributes</A>
</H1>

<P>
<A NAME="17498"></A><A NAME="17499"></A><A NAME="sec:pen"></A>A pen in <A NAME="tex2html1141"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> has three attributes: <I>width</I>, <I>color</I>,
and <I>texture</I>.  Most programs will accept pen attributes in
the form of an option argument, with commas separating the
given attributes, e.g.,

<P>
<BR> 

<P>
<B>-W</B>[<I>width</I>[<B>c<IMG
 WIDTH="8" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img12.png"
 ALT="$\vert$">i<IMG
 WIDTH="8" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img12.png"
 ALT="$\vert$">p<IMG
 WIDTH="8" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img12.png"
 ALT="$\vert$">m</B>]],[<I>color</I>],[<I>texture</I>[<B>c<IMG
 WIDTH="8" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img12.png"
 ALT="$\vert$">i<IMG
 WIDTH="8" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img12.png"
 ALT="$\vert$">p<IMG
 WIDTH="8" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img12.png"
 ALT="$\vert$">m</B>]]
<P>
<DL>
<DD><A NAME="17512"></A>
<A NAME="17513"></A>
<A NAME="17514"></A></DD>
<DT><STRONG><IMG
 WIDTH="20" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
 SRC="img21.png"
 ALT="$\rightarrow$"></STRONG></DT>
<DD><I>Width</I> is by default measured in units of the
current device resolution (i.e., the value assigned to the parameter
<B>DOTS_PR_INCH</B> in your <U>.gmtdefaults4</U> file).  Thus, if the
dpi is set to 300 this unit is 1/300th of an inch.  Append <B>c</B>,
<B>i</B>, <B>p</B>, or <B>m</B> to specify pen width in cm, inch, points
(1/72 of an inch), or meters, respectively.
Note that a pen thickness of 5 will be of different physical width
depending on your dpi setting, whereas a thickness of 5<B>p</B> will
always be 5/72 of an inch.  Minimum-thickness pens can be achieved by
giving zero width, but the result is device-dependent.  Finally, a few
predefined pen names can be used: default, faint, and {thin, thick, fat}[er<IMG
 WIDTH="8" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img12.png"
 ALT="$\vert$">est],
and obese.  Table&nbsp;<A HREF="#tbl:pennames">4.4</A> shows this list and the corresponding pen widths.
<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="17540"></A>
<TABLE>
<CAPTION><STRONG>Table:</STRONG>
<A NAME="tex2html1136"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> predefined pen widths.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><TABLE CELLPADDING=3 BORDER="1">
<TR><TD ALIGN="CENTER" COLSPAN=1><I>Pen name</I></TD>
<TD ALIGN="CENTER" COLSPAN=1><I>Width</I></TD>
<TD ALIGN="CENTER" COLSPAN=1><I>Pen name</I></TD>
<TD ALIGN="CENTER" COLSPAN=1><I>Width</I></TD>
</TR>
<TR><TD ALIGN="LEFT">faint</TD>
<TD ALIGN="CENTER">0</TD>
<TD ALIGN="LEFT">thicker</TD>
<TD ALIGN="CENTER">1.5p</TD>
</TR>
<TR><TD ALIGN="LEFT">default</TD>
<TD ALIGN="CENTER">0.25p</TD>
<TD ALIGN="LEFT">thickest</TD>
<TD ALIGN="CENTER">2p</TD>
</TR>
<TR><TD ALIGN="LEFT">thinnest</TD>
<TD ALIGN="CENTER">0.25p</TD>
<TD ALIGN="LEFT">fat</TD>
<TD ALIGN="CENTER">3p</TD>
</TR>
<TR><TD ALIGN="LEFT">thinner</TD>
<TD ALIGN="CENTER">0.50p</TD>
<TD ALIGN="LEFT">fatter</TD>
<TD ALIGN="CENTER">6p</TD>
</TR>
<TR><TD ALIGN="LEFT">thin</TD>
<TD ALIGN="CENTER">0.75p</TD>
<TD ALIGN="LEFT">fattest</TD>
<TD ALIGN="CENTER">12p</TD>
</TR>
<TR><TD ALIGN="LEFT">thick</TD>
<TD ALIGN="CENTER">1.0p</TD>
<TD ALIGN="LEFT">obese</TD>
<TD ALIGN="CENTER">18p</TD>
</TR>
</TABLE>

<A NAME="tbl:pennames"></A></DIV></TD></TR>
</TABLE>
</DIV><P></P>
<BR>

<P>
<A NAME="17543"></A>
<A NAME="17544"></A>
<A NAME="17545"></A>
<A NAME="17546"></A>
<A NAME="17547"></A>
<A NAME="17548"></A></DD>
<DT><STRONG><IMG
 WIDTH="20" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
 SRC="img21.png"
 ALT="$\rightarrow$"></STRONG></DT>
<DD>The <I>color</I> can be specified in five different ways:

<OL>
<LI>Gray. Specify a <I>gray</I> shade in the range 0-255 (linearly going from black [0] to white [255]).
</LI>
<LI>RGB. Specify <I>r</I>/<I>g</I>/<I>b</I>, each ranging from 0-255.  Here 0/0/0 is black, 255/255/255 is white,
255/0/0 is red, etc.
</LI>
<LI>HSV. Specify <I>hue</I>-<I>saturation</I>-<I>value</I>, with the former in the 0-360 degree range while the latter
two take on the range 0-1<A NAME="tex2html1139"
  HREF="footnode.html#foot18130"><SUP>4.10</SUP></A>.
</LI>
<LI>CMYK. Specify <I>cyan</I>/<I>magenta</I>/<I>yellow</I>/<I>black</I>, each ranging from 0-100%.
</LI>
<LI>Name.  Specify one of 663 valid color names.  Use <I>man gmtcolors</I><A NAME="18788"></A> to list all valid names.
A very small yet versatile subset consists of the 29 choices <I>white</I>, <I>black</I>, and
[light<IMG
 WIDTH="8" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img12.png"
 ALT="$\vert$">dark]{<I>red,
orange, yellow, green, cyan, blue, magenta, gray<IMG
 WIDTH="8" HEIGHT="31" ALIGN="MIDDLE" BORDER="0"
 SRC="img12.png"
 ALT="$\vert$">grey, brown</I>}.
The color names are case-insensitive, so mixed upper and lower case can be used (like
<I>DarkGreen</I>).
</LI>
</OL>

<P>
<A NAME="17569"></A>
<A NAME="17570"></A>
<A NAME="17571"></A></DD>
<DT><STRONG><IMG
 WIDTH="20" HEIGHT="13" ALIGN="BOTTOM" BORDER="0"
 SRC="img21.png"
 ALT="$\rightarrow$"></STRONG></DT>
<DD>The <I>texture</I> attribute controls the appearance
of the line.  A ``.'' yields a dotted line, whereas a dashed pen is requested with ``-''.
Also combinations of dots and dashes, like ``.-'' for a dot-dashed line, are allowed.
The lengths of dots and dashes are scaled relative to the pen width (dots has
a length that equals the pen width while dashes are 8 times as long; gaps between
segments are 4 times the pen width).
For more detailed attributes including exact dimensions you may specify <I>string</I>:<I>offset</I>,
where <I>string</I> is a series of numbers separated by underscores.
These numbers represent a pattern by indicating the length of line
segments and the gap between segments.  The <I>offset</I> phase-shifts the
pattern from the beginning the line.  For example, if you want a yellow line of width
0.1 cm that alternates between long dashes (4 points), an 8 point gap, then
a 5 point dash, then another 8 point gap, with pattern offset by 2 points
from the origin, specify <B>-W</B>0.1c,yellow,4_8_5_8:2p.
In general, the texture units can be specified in dpi units, cm, inch, points,
or meters (see <I>width</I> discussion above). 
</DD>
</DL> 
Table&nbsp;<A HREF="#tbl:penex">4.5</A> contains additional examples of pen specifications suitable for, say, <A NAME="tex2html1142"
  HREF="../man/psxy.html"><I><B>psxy</B></I></A><A NAME="18793"></A>.

<P>
<BR><P></P>
<DIV ALIGN="CENTER"><A NAME="17598"></A>
<TABLE>
<CAPTION><STRONG>Table 4.5:</STRONG>
A few examples of pen specifications.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><TABLE CELLPADDING=3 BORDER="1">
<TR><TD ALIGN="CENTER" COLSPAN=1><I>Pen example</I></TD>
<TD ALIGN="CENTER" COLSPAN=1><I>Comment</I></TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-W</B>0.5p</TH>
<TD ALIGN="LEFT">Solid black line, 0.5 point thick</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-W</B>green</TH>
<TD ALIGN="LEFT">Solid green line with default width</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-W</B>thin,red,-</TH>
<TD ALIGN="LEFT">Dashed, thin red line</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-W</B>fat,.</TH>
<TD ALIGN="LEFT">Fat dotted line [black]</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-W</B>0.1c,120-1-1</TH>
<TD ALIGN="LEFT">Green (in h-s-v) pen, 1 mm thick</TD>
</TR>
<TR><TH ALIGN="LEFT"><B>-W</B>faint,100/0/0/0,..-</TH>
<TD ALIGN="LEFT">Very thin, cyan (in c/m/y/k), dot-dot-dashed line</TD>
</TR>
</TABLE>

<A NAME="tbl:penex"></A></DIV></TD></TR>
</TABLE>
</DIV><P></P>
<BR>

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html3436"
  HREF="node66.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html3430"
  HREF="node30.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html3424"
  HREF="node64.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html3432"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html3434"
  HREF="node255.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html3437"
  HREF="node66.html">4.14 Specifying area fill</A>
<B> Up:</B> <A NAME="tex2html3431"
  HREF="node30.html">4. General features</A>
<B> Previous:</B> <A NAME="tex2html3425"
  HREF="node64.html">4.12 PostScript features</A>
 &nbsp; <B>  <A NAME="tex2html3433"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html3435"
  HREF="node255.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2010-01-14
</ADDRESS>
</BODY>
</HTML>