|
From: Ethan M. <merritt@u.washington.edu> - 2010-03-23 22:00:34
|
On Monday 22 March 2010 23:34:34 Anthony Thyssen wrote: > > | Date: Mon, 22 Mar 2010 13:50:29 +1000 > | To: gnu...@li... > | Subject: How to generate a graph image of specific size without labels? > | > | How to generate a graph image of specific size without labels? > | > | that is I what the 'border' of the plot to be the 'border' of the > | final image that is of specific size. It is vital for including > | the plot results into other image mosaics. > | > > With suggestions from Daniel J Sebald I am posting the method > which I used with gnuplot v4.2.3-1 under Fedora 10. > > The script it was part of, broke with a OS version upgrade to > gnuplot v4.2.6-1 under fedora 12 > > > set terminal png size 340,210 > unset key > set format "" > set xtics ( 75, 150, 225 ) scale 2 > set ytics ( 0.25, 0.5, 0.75 ) scale 2 > set xrange [0:300] > set yrange [0:1] > > The 'size' was designed to actually generate a 'graph' that was > exactly 300x184 pixels in size after it is 'autocroped' using > ImageMagick. Your script is not doing what you stated that you wanted to do. If you want to guarantee that the plot boundary is a particular size, you should do that directly. You can't rely on auto-crop because the size will change depending on at least the font size, if not the phase of the moon. If you really have no labels or other plot decorations outside of the plot borders, then you want: set term png size 340,210 set lmargin at screen 0 set rmargin at screen 1 set bmargin at screen 0 set tmargin at screen 1 If for some reason you want to work with some white space around it, and then later crop to final size: set term png size 374,231 # NB: 10% bigger than the final size set lmargin at screen 0.05 set rmargin at screen 0.95 set bmargin at screen 0.05 set tmargin at screen 0.95 > Now both versions generate a image 340x210 pixels but the > graph area which was 300x184 pixels > is now under gnuplot v4.2.6-1 producing 292x171 pixels > > In another example a gnuplot "png size" of > was producing 150x89 pixel graph > is now producing 142x76 Right. That method was never reliable. That's why we added a mechanism for specifying the boundaries precisely. hope that helps, Ethan > > This naturally breaks my scripts!!! > > NOTE that I am not generating any title, keys, or other output > just the graph itself. > > > > Anthony Thyssen ( System Programmer ) <A.T...@gr...> > -------------------------------------------------------------------------- > "3 billion human lives ended on August 29th, 1997. The survivors of the > nuclear fire called the war Judgment Day. They lived only to face a new > nightmare, the war against the Machines..." -- "Terminator 2" Movie > -------------------------------------------------------------------------- > Anthony's Castle http://www.cit.griffith.edu.au/~anthony/ > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |