1
1
%
2
- % $Id: tutorial.tex,v 1.8 2010/09/17 03:05:25 sfeam Exp $
2
+ % $Id: tutorial.tex,v 1.9 2010/09/17 20:58:12 sfeam Exp $
3
3
%
4
4
% Tutorial for gnuplot plotting program, for LaTeX users
5
5
% David Kotz
33
33
{\bf current gnuplot team} \\ [0.4cm]
34
34
Updates of this tutorial for gnuplot 4.0, March 2004 \\
35
35
Update of this tutorial for gnuplot 4.2, August 2006 \\
36
- Update of this tutorial for gnuplot 4.4, August 2010
36
+ Update of this tutorial for gnuplot 4.4, September 2010
37
37
38
38
\vskip 2cm
39
39
@@ -68,8 +68,7 @@ \section{Introduction and History}
68
68
In late 1989 and early 1990 Gnu\TeX \ and a number of other gnuplot
69
69
variants were merged together into a new release of gnuplot, 2.0. This
70
70
includes, among many other improvements, a \LaTeX \ driver derived from
71
- the one in Gnu\TeX . Former Gnu\TeX \ users are referred to
72
- Section~\ref {oldusers } for information about adapting to gnuplot.
71
+ the one in Gnu\TeX .
73
72
Anyone interested in using gnuplot with \LaTeX \ should read the next
74
73
section, a tutorial, and the primary gnuplot manual.
75
74
@@ -89,9 +88,6 @@ \section{Introduction and History}
89
88
available for \verb +ftp + as \verb +pub/gnuplot-latex.shar + from
90
89
\verb +cs.duke.edu +.
91
90
92
- NB: There is also a much more recent tikz latex terminal that
93
- is not described in this tutorial.
94
-
95
91
\section {Using gnuplot for \LaTeX : a Tutorial }
96
92
97
93
Gnuplot is by nature an interactive program. Users making plots for
@@ -178,13 +174,13 @@ \section{Using gnuplot for \LaTeX: a Tutorial}
178
174
\end {verbatim }
179
175
\currentspace
180
176
181
- \boxfigure {htbp}{ \fullboxwidth }{
177
+ \begin { figure }[htbp]
182
178
\begin {center }
183
179
\input {eg2 }
184
180
\end {center }
185
- \caption {A more fancy example.}
181
+ \caption {A fancier example.}
186
182
\label {eg2 }
187
- }
183
+ \end { figure }
188
184
189
185
We have specified the plot to be 7 cm wide and 5 cm tall with
190
186
the {\tt set term latex size ...} command. This is the size of the
@@ -263,7 +259,7 @@ \section{Using gnuplot for \LaTeX: a Tutorial}
263
259
each data point. The {\tt points} and {\tt linespoints} styles
264
260
produce a different point symbol for each curve on the plot (for up to
265
261
twelve symbols, after which they are re-used; see
266
- Figure~\ref {test } for a complete list). The {\tt lines} and {\tt
262
+ Figure~\ref {testcomp } for a complete list). The {\tt lines} and {\tt
267
263
linespoints} styles use a different line style for each curve on the
268
264
plot (in this example the dots have different spacing). The
269
265
style {\tt impulses} draws a perpendicular from each point to the
@@ -361,27 +357,19 @@ \section{Using gnuplot for \LaTeX: a Tutorial}
361
357
\end {verbatim }
362
358
\currentspace
363
359
364
- \boxfigure {htbp}{ \fullboxwidth }{
360
+ \begin { figure }
365
361
\begin {center }
366
362
\input {eg6 }
367
363
\end {center }
368
364
\caption {An example of many features.}
369
365
\label {eg6 }
370
- }
366
+ \end { figure }
371
367
372
368
\paragraph {Line and point types: } For reference, we show all of the
373
- line and point types available in Figure~\ref {test }.
374
-
375
- \boxfigure {htbp}{\fullboxwidth }{
376
- \begin {center }
377
- \input {test }
378
- \end {center }
379
- \caption {All of the line and point types in the \LaTeX \ driver.}
380
- \label {test }
381
- }
369
+ line and point types available in Figure~\ref {testcomp }.
382
370
383
371
\subsection {Summary --- Use with \LaTeX }
384
- In summary, to use the \LaTeX \ facilities of gnuplot, the first
372
+ In summary, to use the most basic \LaTeX \ mode of gnuplot, the first
385
373
command to gnuplot should be
386
374
\begin {syntax }
387
375
set terminal latex
@@ -445,7 +433,8 @@ \section{Use with EEPIC}
445
433
\section {What is new for \TeX {} and \LaTeX {} terminals in gnuplot 4.0 }
446
434
447
435
In addition to the \texttt {latex } terminal, the following \LaTeX -friendly
448
- terminals are available:
436
+ terminals are available. The gnuplot documentation contains more information
437
+ about the options and usage for each of these.
449
438
450
439
\begin {itemize }
451
440
\item \texttt {emtex }: Like the \texttt {latex } terminal, but supports emtex
@@ -463,11 +452,6 @@ \section{What is new for \TeX{} and \LaTeX{} terminals in gnuplot 4.0}
463
452
464
453
\end {itemize }
465
454
466
- See helps of these terminals for more details about their usage.
467
-
468
- In addition, the \texttt {postscript eps enhanced } is the most useful for \TeX {}
469
- and \LaTeX {} if you don't insist on using \TeX {} fonts for the graph labels, and
470
- \texttt {pdf enhanced } and \texttt {png enhanced } for pdf\LaTeX {}.
471
455
472
456
\section {What is new for \TeX {} and \LaTeX {} terminals in gnuplot 4.4 }
473
457
@@ -476,7 +460,8 @@ \section{What is new for \TeX{} and \LaTeX{} terminals in gnuplot 4.4}
476
460
\item \texttt {pslatex and epslatex }: Rewritten version. See the example below.
477
461
478
462
\item \texttt {tikz }: Much improved graphics compaired to earlier \LaTeX terminals.
479
- Requires a lua interpreter as an intermediate processing step.
463
+ Requires a lua interpreter that is called by gnuplot. Compare the output
464
+ of the \texttt {test } command to that from the minimal latex terminal.
480
465
481
466
\end {itemize }
482
467
@@ -517,6 +502,18 @@ \section{Sample of epslatex terminal driver}
517
502
\label {epslatex_test }
518
503
}
519
504
505
+ \begin {figure }[htbp]
506
+ \begin {center }
507
+
508
+ \subfigure [Line and point types in the latex driver]
509
+ {\input {test }}
510
+ \subfigure [Line and point types in the tikz driver]
511
+ {\input {test_tikz }}
512
+
513
+ \end {center }
514
+ \caption {The exact line and point types available depend on the terminal type.}
515
+ \label {testcomp }
516
+ \end {figure }
520
517
521
518
\section {Contact for help }
522
519
0 commit comments