|
From: theozh <th...@gm...> - 2016-04-21 12:02:00
|
set rmargin manually in screen coordinates such that you get a squared graph. For this, it might be convenient to define variables "PlotWidth" and "PlotHeight". In the code below I added a "control" graph in the wxt terminal. Skip the lines if you don't need it. Apart from this: a question from my side to the gnuplot-experts: If I leave out the decimal points in the definition for PlotWidth and PlotHeight, I will get an empty graph because the (integer) division is obviously zero and as a consequence rmargin is set at screen 0. If I anyway load the same gnuplot code a second time, gnuplot crashes/ends immediately. Is this a bug or a feature? ################### gnuplot example ##################### reset set terminal png size PlotWidth,PlotHeight font "Arial,10" set output 'out.png' PlotWidth=318. # decimal point to avoid integer division PlotHeight=256. # see above set lmargin 0 set rmargin at screen (PlotHeight/PlotWidth) set tmargin 0 set bmargin 0 set colorbox user size 0.05,0.8 origin 0.85,0.1 plot[0:1][0:1] '-' u 1:2:3 with image 0 0 0 0 1 1 1 0 2 1 1 3 e set output set term wxt size PlotWidth,PlotHeight replot ################# end of example ###################### |