|
From: Allin C. <cot...@wf...> - 2009-02-23 00:44:44
|
Problem: with both the png (libgd) and cairopng terminals, depending on the font selected the gnuplot "key" may overflow the plot data region (even if the key terms are in no way excessive, e.g. n <= 8 characters per term). Example: set term pngcairo font "FreeSans,8" size 680,400 set output 'test.png' set key left top plot x title "PRIME" w lines , \ 2*x title "UNEMP" w lines In the resulting plot, the 'U' of "UNEMP" is vertically bisected by the y axis. The desired result is that all the key text appears within the data area (i.e. to the right of the y axis); and this is achieved if we change the first line of the plot file to (for example) set term pngcairo font "Vera,8" size 680,400 I'd be happy to try to work up a patch for this, but I'm having difficulty figuring out where to start -- i.e., determining where the left limit of the key block is computed, given the selected font. P.S., on further investigation this does not seems to be very terminal-specific: I'm getting the same issue with the pdf, pdfcairo, and 'post eps' terminal types. -- Allin Cottrell Department of Economics Wake Forest University |