![]() | |
![]() |
![]() ![]() ![]() ![]() |
![]() |
Gnuplot has a latex terminal which is capable of generating a PicTeX graph. This terminal, however, tends to makes a lot of data points to show a graph, and sometimes you cannot process it with the TeX system because a computer memory is not enough. An easy way to include your graph into the TeX document, make the graph in an EPS format and use the LaTeX graphics (graphicx) package. Firstly, make a figure with gnuplot, and use the enhanced EPS terminal to make an EPS file.
![]() If you don't change the figure size, letters in the generated EPS become too small in comparison with the graph. To make them larger, use the set term option to specify the larger font, or use the set size command to make the whole figure smaller, just like the example above. The font size is the same even you change the size of figure, so that the letters become larger relative to the graph. When symbols in your figure have error bars, the PostScript driver draws the bars with the specified line type. If those are not the number 1 (solid line), gnuplot the error bars with draws dotted or dashed lines. To avoid this, use linestyle to set the linetype lt=1 and change the symbol number pt. To paste a graph in your TeX(LaTeX2e) document, use graphics package. \includegraphics{ EPS file } command inserts the figure at that location. The EPS file name is specified at EPS file. If you want to chance the figure size, use \resizebox{X size}{Y size} command, which enlarges or shrinks the figure size. If you want to keep the aspect ratio, put "!" into the X or Y size. In the next example, a figure is inserted into the figure environment, a caption is given, and the figure width is set to 120mm.
![]() |
There are several ways to merge some figures, for example, use multiplot, combine EPS figures into one drawing. Maybe the simplest way to do is to use a LaTeX tabular environment, and arrange the EPS figures. When you have 4 figures, and those are aligned into 2x2 matrix. The Y label appears only the left figures, while the lower figures have X label. In addition, a caption is given for 4 drawings, namely those 4 plots are regarded as one figure. Firstly, those 4 figures are prepared by 4 different EPS files. At that time, all figures should be in the same size. As an example, here shows the graphs of y=sin(x), cos(x), sin(2x), and cos(2x).
Those EPS figures are inserted into the tabular environment, and aligned.
![]() If you want to make one PS file which contains several figures, use the tabular environment (not table float), and cut off with the dvips command line option -pp . With the -E option, you can make another EPS file which contains several figures. See the manual of divps. Of course the same thing you can do with a drawing tools like Tgif or commercial softwares. |
![]() | |
![]() |
![]() ![]() ![]() ![]() |
![]() |