Output plot with tics labels inside and without any margins/padding with gnuplot?

gnuplot

Solution

you might want to try to tweak this

set lmargin at screen 0
set rmargin at screen 1
set tmargin at screen 1
set bmargin at screen 0
set xtics offset 0, screen 0.1
set ytics offset screen 0.1, 0
plot sin(x)

Problem

Using the following one-liner: ``` gnuplot -e 'set terminal png font ",7" size 300,200 ; \ set output "out.png"; \ set tics in; \ set obj 1 rect behind from screen 0,0 to screen 1,1 ; \ set obj 1 fs fc rgb "gray" ; \ plot sin(x)' ``` I get this output: What I want is: - Both tics and labels inside the plot - No margins/padding - so that the plot takes the full requested size ... that is, something like this: (this image was scaled composited in gimp, so ignore the changes in color and apparent resolution) Any ways to achieve something like this in `gnuplot`?

Original source