From: Thomas S. <t.s...@fz...> - 2012-02-14 13:22:16
|
David Rodenas <drodenasherraiz <at> yahoo.es> writes: > > Hi all > 12345678901234567890123456789012345678901234567890123456789012345678901234567890 > I am an experimented user of gnuplot, but I cannot plot a specific figure. I want to plot a figure with grids, > and within this figure, I also want to plot another one of smaller size with its respective grid. My problem > is that the first grid is above the second figure. I've attached to this email an example of what I need. > Is that possible? > > I write the code that I am using next: > -------------------------------------------------------------------------------- > > set multiplot; > set size SX,SY > > set origin DX,DY; > set key 10,1950 font "Helvetica,16" > set ylabel "YLABEL" font "Helvetica,16" > set ylabel "XLABEL" font "Helvetica,16" > > set yrange [0:2000] > set grid > plot "file1.dat" using 1:3:4 title 'one' with yerrorlines lw 2 pt 1 linecolor rgb "red",\ > "file2.dat" using 1:3:4 title 'two' with yerrorlines lw 2 pt 3 linecolor rgb "blue" > > set size 0.30,0.30 > > set style fill solid 1.0 > set origin DX+0.08,DY+0.28 > set ylabel "YLABEL" 1 font "Helvetica,9" > set xlabel "XLABEL" font "Helvetica,9" > set ytics font "Helvetica,8" > set xtics font "Helvetica,8" > set xrange [1:14] > set yrange [10:365] > unset key > replot > unset multiplot > -------------------------------------------------------------------------------- > > Thanks for the help > > David > draw a rectangle on top of the 1st plot and delete it before doing the 2nd plot: ... set yrange [0:2000] set grid set object 1 rectangle from screen 0.08,0.28 rto 0.3,0.3 plot "file1.dat" using 1:3:4 title 'one' with yerrorlines \ lw 2 pt 1 linecolor rgb "red",\ "file2.dat" using 1:3:4 title 'two' with yerrorlines \ lw 2 pt 3 linecolor rgb "blue" unset object 1 ... |