/usr/share/doc/pyxplot/html/ex-surface-sinc.html is in pyxplot-doc 0.8.4-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="plasTeX" />
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<title>PyXPlot Users' Guide: Surface Plotting</title>
<link href="ch-image_formats.html" title="Producing Image Files" rel="next" />
<link href="sec-threedim.html" title="Three-Dimensional Plotting" rel="prev" />
<link href="sec-threedim.html" title="Three-Dimensional Plotting" rel="up" />
<link rel="stylesheet" href="styles/styles.css" />
</head>
<body>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sec-threedim.html" title="Three-Dimensional Plotting"><img alt="Previous: Three-Dimensional Plotting" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="sec-threedim.html" title="Three-Dimensional Plotting"><img alt="Up: Three-Dimensional Plotting" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="ch-image_formats.html" title="Producing Image Files"><img alt="Next: Producing Image Files" border="0" src="icons/next.gif" width="32" height="32" /></a></td>
<td class="navtitle" align="center">PyXPlot Users' Guide</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>
<td><a href="sect0255.html" title="Index"><img border="0" alt="" src="icons/index.gif" width="32" height="32" /></a></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>
<div class="breadcrumbs">
<span>
<span>
<a href="index.html">PyXPlot Users' Guide</a> <b>:</b>
</span>
</span><span>
<span>
<a href="sect0043.html">Plotting and Vector Graphics</a> <b>:</b>
</span>
</span><span>
<span>
<a href="ch-plotting.html">Plotting: A Detailed Survey</a> <b>:</b>
</span>
</span><span>
<span>
<a href="sec-threedim.html">Three-Dimensional Plotting</a> <b>:</b>
</span>
</span><span>
<span>
<b class="current">Surface Plotting</b>
</span>
</span>
<hr />
</div>
<div><h2 id="ex:surface-sinc">1.14.1 Surface Plotting</h2>
<p>The <tt class="tt">surface</tt> plot style is similar to the <tt class="tt">colourmap</tt> and <tt class="tt">contourmap</tt> plot styles, but produces maps of the values <img src="images/img-0509.png" alt="$z(x,y)$" style="vertical-align:-4px;
width:50px;
height:18px" class="math gen" /> of functions of two variables using three-dimensional surfaces. The surface is displayed as a grid of four-sided elements, whose number may be specified using the <tt class="tt">set samples</tt> command<a name="a0000000861" id="a0000000861"></a>, as in the example </p><pre>
set samples grid 40x40
</pre><p> If data is supplied from a datafile, then it is first re-sampled onto a regular grid using one of the methods described in Section <a href="sec-colourmaps.html">1.12</a>. </p><p>The example below plots a surface indicating the magnitude of the imaginary part of <img src="images/img-0544.png" alt="$\log (x+iy)$" style="vertical-align:-4px;
width:85px;
height:18px" class="math gen" />: </p><p> <tt class="tt">set numerics complex</tt><br /><tt class="tt">set xlabel "Re($z$)"</tt><br /><tt class="tt">set ylabel "Im($z$)"</tt><br /><tt class="tt">set zlabel "$<img src="images/img-0006.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />mathrm{Im}(<img src="images/img-0006.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />mathrm{log}[z])$"</tt><br /><tt class="tt">set key below</tt><br /><tt class="tt">set size 8 square</tt><br /><tt class="tt">set grid</tt><br /><tt class="tt">set view -30,30</tt><br /><tt class="tt">plot 3d [-10:10][-10:10] Im(log(x+i*y)) <img src="images/img-0006.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" /></tt><br /><tt class="tt">with surface col black fillcol blue</tt> </p><p> <center>
<img src="images/img-0546.png" alt="\includegraphics[width=10cm]{examples/eps/ex_surface_log}" style="width:10cm" /></center> </p><p> <span class="upshape"><span class="mdseries"><span class="rm">A surface plotted above a contour map.</span></span></span></p><div>
<table cellspacing="0" class="tabular">
<tr>
<td style="border-top-style:solid; border-left:1px solid black; border-right:1px solid black; border-top-color:black; border-top-width:1px; text-align:left"><p> In this example, we plot a surface showing the value of the expression <img src="images/img-0536.png" alt="$x^3/20+y^2$" style="vertical-align:-5px;
width:84px;
height:21px" class="math gen" />, and project below it a series of contours in the <img src="images/img-0188.png" alt="$(x,y)$" style="vertical-align:-4px;
width:40px;
height:18px" class="math gen" /> plane. </p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">set nokey</tt><br /><tt class="tt">set size 8 square</tt><br /><tt class="tt">plot 3d x**3/20+y**2 with surface col black fillc blue, <img src="images/img-0006.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" /></tt><br /><tt class="tt">x**3/20+y**2 with contours col black</tt> </p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p>The resulting image is shown below: </p></td>
</tr><tr>
<td style="border-bottom-style:solid; border-bottom-width:1px; border-left:1px solid black; border-right:1px solid black; text-align:left; border-bottom-color:black"><center>
<img src="images/img-0549.png" alt="\includegraphics[width=10cm]{examples/eps/ex_surface_polynomial}" style="width:10cm" /> </center></td>
</tr>
</table>
</div><p> <span class="upshape"><span class="mdseries"><span class="rm">The sinc(<img src="images/img-0019.png" alt="$x$" style="vertical-align:0px;
width:10px;
height:8px" class="math gen" />) function represented as a surface.</span></span></span></p><div>
<table cellspacing="0" class="tabular">
<tr>
<td style="border-top-style:solid; border-left:1px solid black; border-right:1px solid black; border-top-color:black; border-top-width:1px; text-align:left"><p> In this example, we produce a surface showing the function <img src="images/img-0551.png" alt="$\mathrm{sinc}(r)$" style="vertical-align:-4px;
width:52px;
height:18px" class="math gen" /> where <img src="images/img-0552.png" alt="$r=\sqrt {x^2+y^2}$" style="vertical-align:-5px;
width:109px;
height:22px" class="math gen" />. To produce a prettier result, we vary the colour of the surface such that the hue of the surface varies with azimuthal position, its saturation varies with radius <img src="images/img-0416.png" alt="$r$" style="vertical-align:0px;
width:8px;
height:8px" class="math gen" />, and its brightness varies with height <img src="images/img-0101.png" alt="$z$" style="vertical-align:0px;
width:9px;
height:8px" class="math gen" />. </p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p><tt class="tt">set numerics complex</tt><br /><tt class="tt">set xlabel "$x$"</tt><br /><tt class="tt">set ylabel "$y$"</tt><br /><tt class="tt">set zlabel "$z$"</tt><br /><tt class="tt">set xformat "%s$<img src="images/img-0006.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />pi$"%(x/pi)</tt><br /><tt class="tt">set yformat "%s$<img src="images/img-0006.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" />pi$"%(y/pi)</tt><br /><tt class="tt">set xtics 3*pi ; set mxtics pi</tt><br /><tt class="tt">set ytics 3*pi ; set mytics pi</tt><br /><tt class="tt">set ztics</tt><br /><tt class="tt">set key below</tt><br /><tt class="tt">set size 8 square</tt><br /><tt class="tt">set grid</tt><br /><tt class="tt">plot 3d [-6*pi:6*pi][-6*pi:6*pi][-0.3:1] sinc(hypot(x,y)) <img src="images/img-0006.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" /></tt><br /><tt class="tt">with surface col black <img src="images/img-0006.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" /></tt><br /><tt class="tt">fillcol hsb(atan2($1,$2)/(2*pi)+0.5):hypot($1,$2)/30+0.2: <img src="images/img-0006.png" alt="$\backslash $" style="vertical-align:-5px;
width:7px;
height:18px" class="math gen" /></tt><br /><tt class="tt">($3*0.5+0.5)</tt> </p></td>
</tr><tr>
<td style="text-align:left; border-right:1px solid black; border-left:1px solid black"><p>The resulting image is shown below: </p></td>
</tr><tr>
<td style="border-bottom-style:solid; border-bottom-width:1px; border-left:1px solid black; border-right:1px solid black; text-align:left; border-bottom-color:black"><center>
<img src="images/img-0554.png" alt="\includegraphics[width=10cm]{examples/eps/ex_surface_sinc}" style="width:10cm" /> </center></td>
</tr>
</table>
</div></div>
<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sec-threedim.html" title="Three-Dimensional Plotting"><img alt="Previous: Three-Dimensional Plotting" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>
<td><a href="sec-threedim.html" title="Three-Dimensional Plotting"><img alt="Up: Three-Dimensional Plotting" border="0" src="icons/up.gif" width="32" height="32" /></a></td>
<td><a href="ch-image_formats.html" title="Producing Image Files"><img alt="Next: Producing Image Files" border="0" src="icons/next.gif" width="32" height="32" /></a></td>
<td class="navtitle" align="center">PyXPlot Users' Guide</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>
<td><a href="sect0255.html" title="Index"><img border="0" alt="" src="icons/index.gif" width="32" height="32" /></a></td>
<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>
<script language="javascript" src="icons/imgadjust.js" type="text/javascript"></script>
</body>
</html>
|