File: drawingtips.html

package info (click to toggle)
grads 3%3A2.2.1-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,396 kB
  • sloc: ansic: 61,645; sh: 10,612; makefile: 206; python: 3
file content (46 lines) | stat: -rw-r--r-- 3,528 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!--Copyright (C) 1988-2005 by the Institute of Global Environment and Society (IGES). See file COPYRIGHT for more information.-->

<html>
<head>
<title>Controlling Colors in GrADS</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body {
	background-color: #e0f0ff;
}
.red {
	color: #900;
}
.red1 {color: #900;
}
</style>
</head>
<body text="#000000">

<h2><b>Drawing Tips</b></h2>
<p>This page contains   some suggestions for making your graphics looks as good as possible when using GrADS version 2.1+ with Cairo enabled. 
<ol>
  <li><strong>Draw axis labels, grid lines, and the map outline only once per plot</strong><br>
    <br>
  When drawing  graphical elements such as lines or letters on a plot, Cairo's anti-aliasing algorithm blends the color of the object into the existing background  to smooth the color transition and make the graphics look  less pixelated and more beautiful. If you redraw the same object a second time,  the existing background  is uneven and the anti-aliasing doesn't work as well and the objects can end up looking blotchy or ragged. Below is an example of the same string (&quot;AaBbCc&quot;) drawn once (first set on the left), twice (second set from the left), three times (middle set), four times (the fourth set), and five times (the set on the right). Each drawing repetition alters the appearance of the string -- the letters look best when drawn only once. <br>
  <img src="images/letters.png" width="376" height="31" alt="letters">  <br>
  To avoid this problem when drawing overlays in a single plot, disable the labeling after the first display. For example:<br>
  <pre>
  <a href="gradcomddisplay.html">d</a> hgt
  <a href="gradcomdsetxlab.html">set xlab</a> off
  <a href="gradcomdsetylab.html">set ylab</a> off
  <a href="gradcomdsetgrid.html">set grid</a> off
  <a href="gradcomdsetmpdraw.html">set mpdraw</a> off
  <a href="gradcomddisplay.html">d</a><a href="gradfuncmag.html"></a> temp
</pre>
  </li>
  <li><strong>Line thickness settings matter </strong><br>
    <br>
    In earlier versions of GrADS, line
  thickness setting between 1 and 5 always looked the same in the display and in image output -- only the vector graphics  formats would show any differences. With Cairo, each line thickness setting will  change the  rendered line thickness, not only for the vector graphics output, but also for  the X window display and  any image output. The anti-aliasing also allows for smooth, thin lines in the image output. However, thin lines that are less than one pixel wide may appear somewhat dim, with the color not fully saturated, because the color will always be partially blended with the background -- no single pixel will have the full color value. To compensate for this dimness, it is not advised to draw the lines twice, because of the problems mentioned above. It is better to tweak either the thickness setting or the RGB values of the color in order to achieve the desired effect of a bright yet thin line. 
    <p>The default line widths for thickness settings between 1 and 12 are:<code> 0.6, 0.8, 1.0, 1.25, 1.5, 1.75, 2.0, 2.2, 2.4, 2.6, 2.8, 3.0. </code>The units (pixels or points) will depend on the surface being drawn to -- pixels for the display window and image output, points for vector graphics. Use the new command <code><a href="gradcomdsetlwid.html">set lwid</a></code> to define a new line thickness setting if the 12 default widths are unsatisfactory. </p>
  </li>
</ol>
</body>
</html>