Sophie

Sophie

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

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.2.2 Changing GMT defaults</TITLE>
<META NAME="description" CONTENT="4.2.2 Changing GMT defaults">
<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="previous" HREF="node33.html">
<LINK REL="up" HREF="node32.html">
<LINK REL="next" HREF="node35.html">
</HEAD>

<BODY  bgcolor="#ffffff">
<!--Navigation Panel-->
<A NAME="tex2html2981"
  HREF="node35.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html2975"
  HREF="node32.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html2971"
  HREF="node33.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html2977"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html2979"
  HREF="node255.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html2982"
  HREF="node35.html">4.3 Command line arguments</A>
<B> Up:</B> <A NAME="tex2html2976"
  HREF="node32.html">4.2 GMT defaults</A>
<B> Previous:</B> <A NAME="tex2html2972"
  HREF="node33.html">4.2.1 Overview and the</A>
 &nbsp; <B>  <A NAME="tex2html2978"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html2980"
  HREF="node255.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H2><A NAME="SECTION001222000000000000000">
4.2.2 Changing </A><A NAME="tex2html1057"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> defaults
</H2>

<P>
As mentioned, <A NAME="tex2html1062"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> programs will attempt to open a file named
<U>.gmtdefaults4</U>.  At times it may be desirable to override
that default.  There are several ways in which this can be accomplished.

<OL>
<LI>Supply another filename using the <I>+filename</I> syntax, i.e.,
on the same command line as the <A NAME="tex2html1063"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> command we append the name of
the alternate <U>.gmtdefaults4</U> file with the plus sign as a prefix.
Because any changes only apply to that one command you would have to
append the alternate file to every command in your script.  This is
tedious but may be an option for situations when you cannot write in
the current directory (e.g., some CGI scripts).
</LI>
<LI>A perhaps less tedious method is to start each script by making a
copy of the current <U>.gmtdefaults4</U>, then copy the desired
<U>.gmtdefaults4</U> file to the current directory, and finally
undo the changes at the end of the script.  Possible side effects
include premature ending of the script due to user error or bugs which
means the final resetting does not take place (unless you write your
script very carefully.)
</LI>
<LI>To permanently change some of the <A NAME="tex2html1064"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> parameters on the fly
inside a script the <A NAME="tex2html1065"
  HREF="../man/gmtset.html"><I><B>gmtset</B></I></A><A NAME="18255"></A> utility can be used.  E.g., to
change the primary annotation font to 12 point Times-Bold we run 
<BR>
<P>
<TT>gmtset ANNOT_FONT_PRIMARY Times-Bold ANNOT_FONT_SIZE_PRIMARY 12</TT> 
<BR>
<P>
These changes will remain in effect until they are overridden.
</LI>
<LI>If all you want to achieve is to change a few parameters during
the execution of a single command but otherwise leave the environment intact, consider
passing the parameter changes on the command line via the --<I>PAR=value</I>
mechanism.  For instance, to temporarily set the output format for floating
points to have lots of decimals, say, for map projection coordinate output,
append --<B>D_FORMAT</B>=%.12lg to the command in question.
</LI>
<LI>Finally, since version 4.2.2 <A NAME="tex2html1066"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> provides to possibility to override the settings only  during the running of a single script, reverting to the original settings after the script is run, as if the script was run in ``isolation''. The isolation mode is discussed in Section&nbsp;<A HREF="node253.html#sec:isolationmode">P.1</A>.
</LI>
</OL>
In addition to those parameters
that directly affect the plot there are numerous parameters than
modify units, scales, etc.  For a complete listing, see the
<A NAME="tex2html1067"
  HREF="../man/gmtdefaults.html"><I><B>gmtdefaults</B></I></A><A NAME="18263"></A> man pages.  We suggest that you go through
all the available parameters at least once so that you know what is
available to change via one of the described mechanisms.

<P>

<DIV ALIGN="CENTER"><A NAME="fig:GMT_Defaults_1c"></A><A NAME="18268"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure:</STRONG>
Even more <A NAME="tex2html1058"
  HREF="http://gmt.soest.hawaii.edu"><B>GMT</B></A> parameters that affect plot appearance.</CAPTION>
<TR><TD>
<DIV ALIGN="CENTER"><IMG
 WIDTH="598" HEIGHT="383" ALIGN="BOTTOM" BORDER="0"
 SRC="img41.png"
 ALT="\includegraphics{scripts/GMT_Defaults_1c}"></DIV></TD></TR>
</TABLE>
</DIV>

<P>
<B>Note:</B> All examples presented in this document started by copying the file
<U>.gmtdefaults4.doc</U> from the directory <U>doc/scripts</U> to <U>.gmtdefaults4</U>.
As a result the commands <A NAME="tex2html1068"
  HREF="../man/gmtset.html"><I><B>gmtset</B></I></A><A NAME="18279"></A> of other scripts were overall, reverting to a
``virgin'' of parameters set in <U>.gmtdefaults4.doc</U>. The graphs in Chapter&nbsp;<A HREF="node120.html#ch:7">7</A> were created
using <U>.gmtdefaults4.doc</U> from the directory <U>examples</U> after which the graphs were
scaled down by 50%.

<P>
<A NAME="16750"></A>
<A NAME="16751"></A>

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html2981"
  HREF="node35.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html2975"
  HREF="node32.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html2971"
  HREF="node33.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html2977"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html2979"
  HREF="node255.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html2982"
  HREF="node35.html">4.3 Command line arguments</A>
<B> Up:</B> <A NAME="tex2html2976"
  HREF="node32.html">4.2 GMT defaults</A>
<B> Previous:</B> <A NAME="tex2html2972"
  HREF="node33.html">4.2.1 Overview and the</A>
 &nbsp; <B>  <A NAME="tex2html2978"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html2980"
  HREF="node255.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>
Paul Wessel
2010-01-14
</ADDRESS>
</BODY>
</HTML>