|
From: Allin C. <cot...@wf...> - 2007-11-21 17:15:27
|
I'll float this by the list first and submit a tracker item if there's any support. I would find it very useful to get a readback from gnuplot on the internal dimensions of a PNG file -- that is, the pixel bounds of the data area and also the data minima and maxima. This is for generating an interactive display (much like the mousable wxt terminal display, but with additional features). I may be missing something, but I don't think there's any way of doing this at present. The attached patch adds a boolean "boundsfile" option to pngcairo. If this is activated, and if output is going to a named file, the driver also writes out a small auxiliary file containing the data mentioned above. The aux file has the same name as the PNG file plus the suffix ".bounds". For example, if you do: set term pngcairo bounds set output 'test.png' plot sin(x) you get test.png as usual, but also a file named test.png.bounds with content xleft=89 xright=620 ybot=37 ytop=460 xmin=-10 xmax=10 ymin=-1 ymax=1 -- Allin Cottrell Department of Economics Wake Forest University, NC |