I tried and searched for the solution, and finally got the key. It is better to set the size for the entire plot before the multiplot setting.
Here is my original WRONG setting structure:
- set the terminal
- set the output filename
- set the size for individual figures
- set multiplot
- set the origin for individual figures
- plot individual figures
- unset multiplot
- set the terminal
- set the output filename
- set the size for the entire plot
- set the origin for the entire plot
- set multiplot
- set the size for individual figures
- set the origin for individual figures
- plot individual figures
- unset multiplot
---
Let me show you the (correct) example.
1 set terminal postscript eps enhanced color solid 20
2 set output "test_nogood.eps"
3
4 set nokey
5 set size 1,1
6 set origin 0,0
7
8 set multiplot
9
10 set tmargin 0.5
11 set bmargin 0.5
12 set rmargin 1.0
13 set lmargin 5.0
14
15 set xrange [-25:25]
16 set ylabel "f(x)"
17 set noxtics
18 set noytics
19
20 set size 1,0.20
21 set origin 0.0,0.76
22 set title "sin(x)" offset 0,-1.0
23 plot sin(x) w l lt 1 lw 2
24 set size 1,0.20
25 set origin 0.0,0.54
26 set title "cos(x)" offset 0,-1.0
27 plot cos(x) w l lt 9 lw 2
28 set size 1,0.20
29 set origin 0.0,0.32
30 set title "sin(x)/x" offset 0,-1.0
31 plot sin(x)/x w l lt 3 lw 2
32 set size 1,0.20
33 set origin 0.0,0.10
34 set xlabel "x"
35 set title "x*sin(x)" offset 0,-1.0
36 plot x*sin(x) w l lt 8 lw 2
37
38 unset multiplot
39
40 reset
41
You will get the following plot:
If you change line 5 as ``set size 1,0.20'' and comment out lines 6, 20, 24, 28, and 32, the output result will be as the following plot:
It gives only the last part of the eps file.
---
References:
Gnuplot FAQ: 7.6 My output files are incomplete!
Visualize your data with gnuplot
Thank you for posting this. This is just the thing I was trying to figure out how to do.
ReplyDeleteIt's my pleasure. :-)
ReplyDeleteThank You! It's a logical setting, but one has to think of it first... :D
ReplyDeletegreat thanks, just solved it :) !
ReplyDeleteThank you very much!
ReplyDeleteThank You !!!
ReplyDeleteCool and that i have a nifty offer: How Much House Renovation whole home remodel cost
ReplyDelete