This file is indexed.

/usr/share/doc/pyxplot/html/sec-tabulate.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
<!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: Tabulating Functions and Slicing Data Files</title>

<link href="sec-fit_command.html" title="Function Fitting" rel="next" />
<link href="sec-special_comments.html" title="Special Comment Lines in Datafiles" rel="prev" />
<link href="ch-numerics.html" title="Working with Data" 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-special_comments.html" title="Special Comment Lines in Datafiles"><img alt="Previous: Special Comment Lines in Datafiles" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>

<td><a href="ch-numerics.html" title="Working with Data"><img alt="Up: Working with Data" border="0" src="icons/up.gif" width="32" height="32" /></a></td>

<td><a href="sec-fit_command.html" title="Function Fitting"><img alt="Next: Function Fitting" 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="sect0001.html">Introduction to PyXPlot</a> <b>:</b>
</span>

</span><span>
<span>
<a href="ch-numerics.html">Working with Data</a> <b>:</b>
</span>

</span><span>

<span>
<b class="current">Tabulating Functions and Slicing Data Files</b>
</span>
</span>
<hr />
</div>

<div><h1 id="sec:tabulate">5.5 Tabulating Functions and Slicing Data Files</h1>
<p>PyXPlot’s <tt class="tt">tabulate</tt> command<a name="a0000000504" id="a0000000504"></a> is similar to its <tt class="tt">plot</tt> command, but instead of plotting a series of datapoints onto a graph, it writes them to datafiles. This can be used to produce text files containing samples of functions, to rearrange/filter the columns in datafiles, to change the units in which data are expressed in datafiles, and so forth. The following example would produce a datafile called <tt class="tt">gamma.dat</tt> containing a list of values of the gamma function: </p><pre>
set output 'gamma.dat'
tabulate [1:5] gamma(x)
</pre><p>Multiple functions may be tabulated into the same file, either by using the <tt class="tt">using</tt><a name="a0000000505" id="a0000000505"></a> modifier, as in the example </p><pre>
tabulate [0:2*pi] sin(x):cos(x):tan(x) using 1:2:3:4
</pre><p>or by placing them in a comma-separated list, as in the <tt class="tt">plot</tt> command: </p><pre>
tabulate [0:2*pi] sin(x), cos(x), tan(x)
</pre><p>In the former case, the functions are tabulated horizontally alongside one another in a series of columns. In the latter case, the functions are tabulated one after another in a series of index blocks separated by double linefeeds (see Section <a href="sec-plot_datafiles.html">3.8</a>). </p><p>The <tt class="tt">samples</tt> setting can be used to control the number of points that are produced when tabulating functions, in the same way that it controls the <tt class="tt">plot</tt> command:<a name="a0000000506" id="a0000000506"></a> </p><pre>
set samples 200
</pre><p>If the abscissa axis is set to be logarithmic then the points at which functions are evaluated are spaced logarithmically, otherwise they are spaced linearly. </p><p>The <tt class="tt">select</tt><a name="a0000000507" id="a0000000507"></a>, <tt class="tt">using</tt><a name="a0000000508" id="a0000000508"></a> and <tt class="tt">every</tt><a name="a0000000509" id="a0000000509"></a> modifiers operate in the same manner in the <tt class="tt">tabulate</tt> command as in the <tt class="tt">plot</tt> command. Thus the following example would write out the third, sixth and ninth columns of the datafile <tt class="tt">input.dat</tt>, but only when the arcsine of the value in the fourth column is positive: </p><pre>
set output 'filtered.dat'
tabulate 'input.dat' using 3:6:9 select (asin($4)&gt;0)
</pre><p>The numerical display format used in each column of the output file is chosen automatically to preserve accuracy whilst simultaneously being as easily human readable as possible. Thus, columns which contain only integers are displayed as such, and scientific notation is only used in columns which contain very large or very small values. If desired, however, a format statement may be specified using the <tt class="tt">with format</tt> specifier. The syntax for this is similar to that expected by the string substitution operator (<tt class="tt">%</tt>; see Section <a href="sec-stringsubop.html">6.1.1</a>). As an example, to tabulate the values of <img src="images/img-0164.png" alt="$x^2$" style="vertical-align:0px; 
                                     width:17px; 
                                     height:16px" class="math gen" /> to very many significant figures with some additional text, one could use: </p><pre>
tabulate x**2 with format "x = %f ; x**2 = %27.20e"
</pre><p>This might produce the following output: </p><pre>
x = 0.000000 ; x**2 =  0.00000000000000000000e+00
x = 0.833333 ; x**2 =  6.94444444444442421371e-01
x = 1.666667 ; x**2 =  2.77777777777778167589e+00
</pre><p>The data produced by the <tt class="tt">tabulate</tt> command can be sorted in order of any arbitrary metric by supplying an expression after the <tt class="tt">sortby</tt> modifier; where such expressions are supplied, the data are sorted in order from the smallest value of the expression to the largest. </p></div>





<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sec-special_comments.html" title="Special Comment Lines in Datafiles"><img alt="Previous: Special Comment Lines in Datafiles" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>

<td><a href="ch-numerics.html" title="Working with Data"><img alt="Up: Working with Data" border="0" src="icons/up.gif" width="32" height="32" /></a></td>

<td><a href="sec-fit_command.html" title="Function Fitting"><img alt="Next: Function Fitting" 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>