|
From: Ryan D. <som...@ya...> - 2009-08-12 19:10:55
|
Hi, I realized some strange jiggling of plotlines in many svg-gnuplot-graphics. Especially when a plot is supposed to be precise and many datapoints are used, the problem gets worse. Seeking for the bug in the sourcecode, it turned out the problem is that every datapoint to be drawn is handed over as an integer, e.g. TERM_PUBLIC void SVG_vector (unsigned int x, unsigned int y) . In case of the standard-settings SVG_SCALE=1 , this means, that every point is binned to integer-pixelvalues, rendering the whole sense of vector-graphics useless. Some examples where the problem is directly visible: http://commons.wikimedia.org/wiki/File:Normal_distribution_cdf.svg http://commons.wikimedia.org/wiki/File:Soliton_2nd_order.svg (see the grid on the ground which is supposed to be flat) http://commons.wikimedia.org/wiki/File:Arcsin_plot.svg if you don't see what I mean, take a look at the 2000px versions. Many graphics of this kind can be found on the internet. Since it's not a problem concerning only svg-export but a flaw rooting deep inside gnuplot, i cant't correct it by myself. Gnuplot is used in many scientific applications and I'm absolutely convinced, that treating data-points as float values is the only reasonable choice. Those terminals who only support raster-images can round the values later on, and even they can take advantage of precisely located data-samples. As a user, I don't know how to solve it, so I hope you can fix this in the sourcecode. Floating-point output to svg-files with at least 3 digits precision seems essential. thanks in advance! btw: did you notice inkscape's inability to interpret the "color"-attributes in gnuplot-created svg-graphics? maybe it helps to assign stroke- and fill-colors directly. |