gnuplotスクリプトを作成して実行して.epsファイルを生成するPHPスクリプトを作成しました。それらは異なる軸と値を持つ異なるグラフですが、サイズ指定は静的なままです。2つの異なるグラフサイズを生成するGnuplotスクリプト
gnuplotの経験が豊富な人は、生成されたグラフが、サイズパラメータを意図的に設定しても、同じサイズにならない理由を教えてください。
#!/usr/bin/gnuplot
set terminal postscript enhanced color font "/usr/share/fonts/DejaVuSans-Bold" 10
set size ratio 0.72
set output '/.../A.2.1.eps'
set grid
set key center bot
set key out vertical
set key horizontal center
set key box
set style line 1 linetype 1 linecolor rgb "red" linewidth 2.000 pointtype 6 pointsize default
set style line 3 linetype 1 linecolor rgb "#DAA520" linewidth 2.000 pointtype 6 pointsize default
set style line 4 linetype 1 linecolor rgb "#006400" linewidth 2.000 pointtype 6 pointsize default
set style line 6 linetype 1 linecolor rgb "blue" linewidth 2.000 pointtype 6 pointsize default
set multiplot
set palette model RGB functions 0.8+gray/3, 0.8+gray/3, 0.8+gray/3
set pm3d map
set isosample 100,100
unset colorbox
unset border
unset xtics
unset ytics
set nokey
set nolabel
set size 1.165,1.2
set origin -0.045 ,-0.072
splot y t ' '
set title "SECTION A.2.1 TEST RESULTS"
set key box
set key bottom center
set y2tics 0 , 800
set ytics nomirror
set xtics nomirror
set border
set xtics("300" 0 , "600" 1 , "900" 2 , "1200" 3 , "1600" 4 , "2000" 5 , "2400" 6 , "2800" 7 , "3200" 8 , "3600" 9 , "4000" 10 , "4500" 11 , "5500" 12 , "6500" 13 , "7500" 14 , "8500" 15)
set ytics 0 , 11000
set size 1,1
set xtics out offset -1,-1.5
set xtics rotate by 45
unset origin
set x2range [ 0 : 0 ]
set xlabel "Loop Length, 26AWG(ft)" 0,0.8
set ylabel "Downstream Data Rate (kbps)"
set y2label "Upstream Data Rate (kbps)"
set xrange [ 0 : 15 ] noreverse nowriteback
set yrange [ 0 : 55000 ] noreverse nowriteback
set y2range[ 0 : 8000 ] noreverse nowriteback
set bmargin 7
plot "EDS_A.2.1.txt" axes x1y1 ls 4 title 'Expected Downstream Rate' with linespoints, \
"DS_A.2.1.txt" axes x1y1 ls 1 title 'Measured Downstream Rate' with linespoints, \
\
"EUS_A.2.1.txt" axes x1y2 ls 6 title 'Expected Upstream Rate' with linespoints, \
"US_A.2.1.txt" axes x1y2 ls 3 title 'Measured Upstream Rate' with linespoints
unset multiplot
以前のコードでは、このグラフに関する:このコード一方http://i52.tinypic.com/34qu6c0.png
:
#!/usr/bin/gnuplot
set terminal postscript enhanced color font "/usr/share/fonts/DejaVuSans-Bold" 10
set size ratio 0.72
set output '/.../A.2.2.eps'
set grid
set key center bot
set key out vertical
set key horizontal center
set key box
set style line 1 linetype 1 linecolor rgb "red" linewidth 2.000 pointtype 6 pointsize default
set style line 3 linetype 1 linecolor rgb "#DAA520" linewidth 2.000 pointtype 6 pointsize default
set style line 4 linetype 1 linecolor rgb "#006400" linewidth 2.000 pointtype 6 pointsize default
set style line 6 linetype 1 linecolor rgb "blue" linewidth 2.000 pointtype 6 pointsize default
set multiplot
set palette model RGB functions 0.8+gray/3, 0.8+gray/3, 0.8+gray/3
set pm3d map
set isosample 100,100
unset colorbox
unset border
unset xtics
unset ytics
set nokey
set nolabel
set size 1.165,1.2
set origin -0.045 ,-0.072
splot y t ' '
set title "SECTION A.2.2 TEST RESULTS"
set key box
set key bottom center
set y2tics 0 , 850
set ytics nomirror
set xtics nomirror
set border
set xtics("300" 0 , "600" 1 , "900" 2 , "1200" 3 , "2000" 4 , "2800" 5 , "3200" 6 , "4000" 7 , "4500" 8 , "5500" 9 , "6500" 10 , "7500" 11)
set ytics 0 , 12000
set size 1,1
set xtics out offset -1,-1.5
set xtics rotate by 45
unset origin
set x2tics("20" 0 , "100" 1 , "200" 2 , "50" 3 , "100" 4 , "100" 5 , "200" 6 , "100" 7 , "50" 8 , "100" 9 , "100" 10 , "200" 11)
set x2range [ 0 : 11 ]
set xlabel "Loop Length, 26AWG(ft)" 0,0.8
set x2label "Bridge Tap Length, 24AWG (ft)" 0,0.8
set ylabel "Downstream Data Rate (kbps)"
set y2label "Upstream Data Rate (kbps)"
set xrange [ 0 : 11 ] noreverse nowriteback
set yrange [ 0 : 60000 ] noreverse nowriteback
set y2range[ 0 : 8500 ] noreverse nowriteback
set bmargin 7
plot "EDS_A.2.2.txt" axes x1y1 ls 4 title 'Expected Downstream Rate' with linespoints, \
"DS_A.2.2.txt" axes x1y1 ls 1 title 'Measured Downstream Rate' with linespoints, \
\
"EUS_A.2.2.txt" axes x1y2 ls 6 title 'Expected Upstream Rate' with linespoints, \
"US_A.2.2.txt" axes x1y2 ls 3 title 'Measured Upstream Rate' with linespoints
unset multiplot
このグラフに関する:http://i53.tinypic.com/2a7zrci.png
あなたが見ることができるように、サイズの設定がされています同じ; 1つにもう少し多くのポイントがありますが、私はそれのためにグラフが縮小されるとは考えていません。前に言ったように私は手動で設定しました。
グラフ上の停電を許してください。潜在的に機密情報とそのすべての良いもの。
編集:私はライン セット端子追伸サイズ26センチメートルを追加した、18センチメートル などが示唆された、そしてそれが何かを壊していなかったが、それは私が午前奇妙な矛盾を解決しませんでした。
サイズに基づいて背景を塗りつぶす勾配を設定する方法も同様に機能します。 – Joshua
両方のグラフで同じラベルと2つのタイトルを使うことはできませんか? – whoplisp
他のユーザーが発生したエラーを再現できるように、最小限の例を設定してください。 – Woltan