File: print-plot.texi

package info (click to toggle)
oleo 1.6-16
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,640 kB
  • ctags: 3,139
  • sloc: ansic: 39,221; yacc: 1,737; sh: 362; makefile: 88
file content (364 lines) | stat: -rw-r--r-- 11,369 bytes parent folder | download | duplicates (3)
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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
@c \input texinfo    @c -*- texinfo -*-
@c @defcodeindex cm

@node Printing and Plotting
@chapter Printing and Plotting




@menu
* Writing Files::               Writing  Ascii and Postscript Files
* Gnuplot::                     Graphing Using Gnuplot
@end menu

@node Writing Files, Gnuplot, Printing and Plotting, Printing and Plotting
@section Writing  Ascii and Postscript Files

Spreadsheets, and regions of spreadsheets,  can be printed in either
ascii or postscript format.  For postscript files, the font and page
size can be specified.

@table @kbd
@item M-C-p a
@cmindex print-region
Write a region to a file in ascii format. 
If the mark is set, you are prompted for a file name.  
The region between mark and cell cursor will be printed in a tabular
ascii format. If the mark is not set, then you are first prompted for
the region, and then for the file name.  (@code{print-region})
For example, if the mark is not
set, and you want to print the region A1.C20 to the file
@file{/tmp/myfile}, then you type
@example
             @kbd{M-C-p a} A1.C20 @key{RET} /tmp/myfile @key{RET}
@end example

If the mark had been set so that the region between mark and the current
cell is A1.C20, then you only need type
@example
             @kbd{M-C-p a}  /tmp/myfile @key{RET}
@end example

@item M-C-p p p
@cmindex psprint-region
Write a region to a file in postscript format.
If the mark is set, you are prompted for a file name.  
If the mark is not set, then you are first prompted for
the region, and then for the file name.  (@code{psprint-region})
For example, if the mark is not
set, and you want to write the region A1.C20 in postscript to the file
@file{/tmp/myfile}, then you type
@example
             @kbd{M-C-p p p} A1.C20 @key{RET} /tmp/myfile @key{RET}
@end example

If the mark had been set so that the region between mark and the current
cell is A1.C20, then you only need type
@example
             @kbd{M-C-p p p}  /tmp/myfile @key{RET}
@end example

@item M-C-p p f
@cmindex set-default-ps-font
        This command sets the default font used in printing a region in
postscript.  (@code{set-default-ps-font}) @xref{Fonts (in X11)} for
information about the possible fonts. 
To set the font to 24 point courier, type
@example
           M-C-p p f courier 2.0 @key{RET}@footnote{actually, this does
not print correctly - ghostscript gives an error}
@end example


@item M-C-p p s
@cmindex set-page-size
        Set the page size for the postscript output
(@code{set-page-size}). You are prompted for a pagesize.  There are
several possible ways of describing a page size:

@example
        8.5x11          -- a page size in inches.
        22x28c          -- a page size in centimeters.
        612x792p        -- a page size in points.
        letter          -- 8.5 x 11 in. (the default)
@end example

To set the correct page size for A4 paper, type

@example
         M-C-p p s A4 @key{RET}
@end example


The following table gives the possible paper sizes.  The 
widths and heights are given in "points", of which there are 
72 in an inch.  

@example

   Name            Width   Height    Comments
   ------------------------------------------------
   letter          612     792       8.5 x 11   in.   
   landscape       792     612       11  x 8.5  in.   
   tabloid         792     1224      11  x 17   in.    
   ledger          1224    792       17  x 11   in.    
   legal           612     1008      8.5 x 14   in.   
   statement       396     612       5.5 x 8.5  in.   
   executive       540     720       7.5 x 10   in.   
   a3              842     1190    
   a4              595     842     
   latex-a4        523     770       A4 with 1in. margins
   a5              420     595     
   b4              729     1032    
   b5              516     729           
   folio           612     936       8.5 x 13  in.   
   quarto          610     780     
@end example

@end table


@node Gnuplot,  , Writing Files, Printing and Plotting
@section Graphing Using Gnuplot

Plotting in Oleo is done using Gnuplot.  Only line plots and
scatterplots are available.  The simplest plotting sequence
consists of

@itemize @bullet
@item @bullet{}
Select a range to plot 
@item @bullet{}
Plot it
@end itemize

For instance, if the points to be plotted are given by horizontal pairs,
and are located in the range @code{A1.B50}, then these commands will
plot the data:

@example
        @kbd{M-g}  d  0  @key{RET}  A1.B50  @key{RET}  h  r  p
@end example

In general, Oleo can print up to 10 different data sets at once.  The
data sets are numbered 0,1,@dots{},9.  

When the plot command (@kbd{p}) is chosen, all the currently defined
data sets will be plotted.

@menu
* Clearing Plots::              Clearing the plots
* Data sets::                   Choosing a data set
* The axes::                    Changing the axes style
* Viewing Choices::             Viewing your choices
* Output Type::                 Choosing the output type
* Style Options::               Picking a  plot style
* Name Options::                Naming a data set
@end menu

@node Clearing Plots, Data sets, Gnuplot, Gnuplot
@subsection Clearing the Plots

The plot ranges and styles are remembered; if you decide to plot using
@kbd{M-g}, you probably want to clear the ranges and styles using the
@kbd{C} and @kbd{R} keys in the main graph menu:

@table @kbd
@item C
Clear all the datasets (0-9) of their ranges.
@item R
Remove all the style information from all datasets
@end table

@node Data sets, The axes, Clearing Plots, Gnuplot
@subsection Choosing a data set

The key @kbd{d} is used to choose a range for a data set.
If the mark is active, then the region between the mark and the current
cell is chosen as the data set.  Otherwise, you are prompted for the
range.   

When you define a data set (using
the @kbd{d} key in the graph menu), you select a number to refer to the
data set.  If we are already in the graph menu (having typed @kbd{M-g}),
then the following assigns the region G5.L6 to data set 4:
@example
                      d  4  @key{RET} G5.L6  @key{RET} v r 
@end example

If the mark is set, then it is not necessary (nor possible) to enter the
range.  Thus, 
if the mark is set to G5 and the cursor is in L6, then these commands
set the fourth data set to G5.L6:
@example
                      d  4  @key{RET} v r
@end example

You are then prompted for whether the data is given by horizontal pairs
(@kbd{h}), vertical pairs (@kbd{v}), or implicit (@kbd{i}).
Implicit means that the values will be plotted against their order.
For an example, assume that the spreadsheet looks like 

@example
                  | Col B | Col C | Col D | Col E | Col F |
            ------|-------|-------|-------|-------|-------|
            Row 2 |   11  |   33  |  55   |   77  |   99  |
            ------|-------|-------|-------|-------|-------|
            Row 3 |   22  |   44  |  66   |   88  |    0  |
            ------|-------|-------| ------|-------|-------|
@end example


and that we are in the graph menu.
@itemize @bullet
@item
If we type @kbd{d 4 RET B2.F3 RET h r}, then when we print there will be
three line segments:

@example
     (11,33) -- (22,44) -- (55,77) -- (66,88)
@end example

@item
If we type @kbd{d 4 RET B2.F3 RET v r}, then when we print there will be
four line segments:

@example
     (11,22) -- (33,44) -- (55,66) -- (77,88) -- (99,0)
@end example

@item
If we type @kbd{d 4 RET B2.F3 RET i r}, then when we print there will be
nine line segments.  Notice that all the items in the first row are
plotted, then all the ones in the second row, and so on.

@example
(0,11)--(1,33)--(2,55)--(3,77)--(4,99)--(5,22)--(6,44)--(7,66)--(8,88)--(9,0)
@end example

@end itemize



Finally, you are asked about labels.  @footnote{I don't understand them}


@node The axes, Viewing Choices, Data sets, Gnuplot
@subsection Changing the axes style

The commands @kbd{x} and @kbd{y} allow you to control the axes style.

@table @kbd
@item [
You are prompted for the lower limit of the range.
@item ]
You are prompted for the upper limit of the range.
For instance, to set the range of the x-axis to [-3,5], type the
following in the graph menu:
@example
              x [ -3 @key{RET}
              x ]  5 @key{RET}
@end example

@item s@footnote{is it}
Use a symbolic expression for the range @footnote{what?}
@item l
Use values in the spreadsheet for the ticks on the axis.
@footnote{example?}
@item L
Restore the default tick marks for the axis.  This undoes the effect of
the @kbd{l} command.
@end table




@node Viewing Choices, Output Type, The axes, Gnuplot
@comment  node-name,  next,  previous,  up
@subsection Viewing your choices

Typing @kbd{v} in the main graph menu gives a help screen with all of
your choices.  A typical  help screen is

@example
       Parameter                  Value

       output type                x11 # b/w
       x-axis title               ""
       y-axis title               ""
       logarithmic axes           -neither-
       x-axis range               [def..def]
       y-axis range               [def..def]

       Data Set 0  entitled       "my Fermat plot"
       data for this set:          rows of hz pairs in A1.B50
       style for this set:         linespoints
       
       Data Set 1  
       data for this set:          cols of vt pairs in A1.B50
       style for this set:         lines
       
@end example


@node Output Type, Style Options, Viewing Choices, Gnuplot
@comment  node-name,  next,  previous,  up
@subsection The Output Type

The @kbd{o} key in the main graph menu selects the type of output.
A graph can be drawn in three ways: black/white, color, and postscript.
@footnote{postscript does not  work for me, and how about latex and fig
output}

@table @kbd
@item x
Draw the graph in an X window, in black and white.
@item X
Draw the graph in an X window, in color.
@item p
Write a file of postscript commands that draw that graph.
@end table






@node Style Options, Name Options, Output Type, Gnuplot
@comment  node-name,  next,  previous,  up
@subsection Picking a plot style
The @kbd{s} option on the main graph menu selects the graph style.  There
are 5 possibilities:@footnote{gnuplot has 9 styles; should these be added?}

@table @kbd
@item lines
The @emph{lines} style connects adjacent points with lines. (Default)
@item points
 The @emph{points} style displays a small symbol at each point.
@item impulses
 The @emph{impulses} style displays a vertical line from the x axis
to each point. 
@item dots
The @emph{dots} style  plots a tiny dot at each point; this is useful for
 scatter plots with many points.
@item linespoints
 The @emph{linespoints} style does both @emph{lines} and @emph{points}.
@end table

@node Name Options,  , Style Options, Gnuplot
@comment  node-name,  next,  previous,  up
@subsection Naming a data set
The @kbd{d} option on the main graph menu allows a name to be attached
to a data set.  The default name of the i-th data set is "Data set i".
When the graphs are plotted, each graph is printed with a different line
type, and the names of the data set and their line type are printed in
the upper right corner. The name must be in quotes. @footnote{this is
not a good choice}
To add the name "my Fermat plot" 
to  data set 3, type

@example
      n  3  @key{RET}   "my Fermat plot"  @key{RET}
@end example