You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Plots grayshaded, colored, or textured land-masses [or water-masses] on maps and optionally draws coastlines, rivers, and political boundaries. Alternatively, it can (1) issue clip paths that will contain all land or all water areas, or (2) dump the data to an ASCII table. The data files come in 5 different resolutions: (<strong>f</strong>)ull, (<strong>h</strong>)igh, (<strong>i</strong>)ntermediate, (<strong>l</strong>)ow, and (<strong>c</strong>)rude. The full resolution files amount to more than 55 Mb of data and provide great detail; for maps of larger geographical extent it is more economical to use one of the other resolutions. If the user selects to paint the land-areas and does not specify fill of water-areas then the latter will be transparent (i.e., earlier graphics drawn in those areas will not be overwritten). Likewise, if the water-areas are painted and no land fill is set then the land-areas will be transparent. A map projection must be supplied.</p>
486
486
<ul>
487
487
<li><p><strong>J</strong> or <strong>proj</strong> or <strong>projection</strong> : – <em>proj=<parameters></parameters></em><br>
488
-
Select map projection. More at <code></code> [proj] <!-- {{< include ../common_opts/opt_J.qmd >}} --></p></li>
488
+
Select map projection. More at <ahref="../../documentation/common_opts/common_opts.html#proj">proj</a></p></li>
489
489
<li><p><strong>R</strong> or <strong>region</strong> or <strong>limits</strong> : – <em>limits=(xmin, xmax, ymin, ymax)</em><strong>|</strong><em>limits=(BB=(xmin, xmax, ymin, ymax),)</em><strong>|</strong><em>limits=(LLUR=(xmin, xmax, ymin, ymax),units=“unit”)</em><strong>|</strong> …more<br>
490
490
Specify the region of interest. More at <ahref="../../documentation/common_opts/common_opts.html#limits">limits</a>. For perspective view <strong>view</strong>, optionally add <em>zmin,zmax</em>. This option may be used to indicate the range used for the 3-D axes. You may ask for a larger w/e/s/n region to have more room between the image and the axes.</p></li>
<p>To plot Great Britain, Italy, and France in blue with a red outline and Spain, Portugal and Greece in yellow (no outline), and pick up the plot domain form the extents of these countries, use:</p>
<p><strong>grd2cpt</strong> reads one or more grid and computes a static color palette (CPT). Once computed the color palette stays as the current CPT until an image using it is finished, either with the <code>show</code> command or saved to file. The CPT is based on an existing dynamic master CPT of your choice, and the mapping from data value to colors is through the data’s cumulative distribution function (CDF), so that the colors are histogram equalized. Thus if the grid(s) and the resulting CPT are used in <ahref="../..\documentation/modules/grdimage.html">grdimage</a> with a linear projection, the colors will be uniformly distributed in area on the plot. Let z be the data values in the grid. Define CDF(Z) = (# of z < Z) / (# of z in grid). (NaNs are ignored). These z-values are then normalized to the master CPT and colors are sampled at the desired intervals.</p>
492
-
<p>The color palette includes three additional colors beyond the range of z-values. These are the background color (B) assigned to values lower than the lowest <em>z</em>-value, the foreground color (F) assigned to values higher than the highest <em>z</em>-value, and the NaN color (N) painted wherever values are undefined. For color tables beyond the current GMT offerings, visit <ahref="http://soliton.vm.bytemark.co.uk/pub/cpt-city/">cpt-city</a>.</p>
492
+
<p>The color palette includes three additional colors beyond the range of z-values. These are the background color (B) assigned to values lower than the lowest <em>z</em>-value, the foreground color (F) assigned to values higher than the highest <em>z</em>-value, and the NaN color (N) painted wherever values are undefined. For color tables beyond the current GMT offerings, visit <ahref="https://phillips.shef.ac.uk/pub/cpt-city/">cpt-city</a>.</p>
493
493
<p>If the master CPT includes B, F, and N entries, these will be copied into the new master file. If not, the parameters <ahref="https://docs.generic-mapping-tools.org/latest/gmt.conf.html#term-COLOR_BACKGROUND">COLOR_BACKGROUND</a>, <ahref="https://docs.generic-mapping-tools.org/latest/gmt.conf.html#term-COLOR_FOREGROUND">COLOR_FOREGROUND</a>, and <ahref="https://docs.generic-mapping-tools.org/latest/gmt.conf.html#term-COLOR_NAN">COLOR_NAN</a> from the <code>gmt.conf</code> file or the command line will be used. This default behavior can be overruled using the options <strong>bg</strong>, <strong>overrule_bg</strong> or <strong>no_bg</strong>.</p>
494
494
<p>The color model (RGB, HSV or CMYK) of the palette created by <ahref="../..\documentation/modules/makecpt.html">makecpt</a> will be the same as specified in the header of the master CPT. When there is no <ahref="https://docs.generic-mapping-tools.org/latest/gmt.conf.html#term-COLOR_MODEL">COLOR_MODEL</a> entry in the master CPT, the <ahref="https://docs.generic-mapping-tools.org/latest/gmt.conf.html#term-COLOR_MODEL">COLOR_MODEL</a> specified in the <code>gmt.conf</code> (see <ahref="../..\documentation/modules/gmtset.html">gmtset</a>) file or on the command line will be used.</p>
495
495
</section>
@@ -557,7 +557,7 @@ <h2 class="anchored" data-anchor-id="discrete-versus-continuous-cpt">Discrete ve
<p>To get a reasonable and symmetrical color table for the data in the region 0/60/0/60 from the remote 5m relief file, using the geo color table, try:</p>
<p>To make a CPT with entries from 0 to 200 in steps of 20, and ignore data below zero in computing CDF(Z), and use the built-in master cpt file relief, run</p>
575
575
<divclass="code-copy-outer-scaffold"><divclass="sourceCode" id="cb4"><preclass="sourceCode julia code-with-copy"><codeclass="sourceCode julia"><spanid="cb4-1"><ahref="#cb4-1" aria-hidden="true" tabindex="-1"></a> C <spanclass="op">=</span><spanclass="fu">grd2cpt</span>(<spanclass="st">"mydata.nc"</span>, cmap<spanclass="op">=:</span>relief, datarange<spanclass="op">=</span>(<spanclass="fl">0</span>,<spanclass="fl">10000</span>), range<spanclass="op">=</span>(<spanclass="fl">0</span>,<spanclass="fl">200</span>,<spanclass="fl">20</span>))</span></code></pre></div><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></div>
576
576
<p>To determine the empirical cumulative density function of a grid and create a CPT that would give equal area to each color in the image, and return the CDF table as well, try:</p>
0 commit comments