|
From: Ethan A M. <EAM...@gm...> - 2016-07-04 18:23:22
|
On Monday, 04 July 2016 04:11:44 PM Grothausmann, Roman Dr. wrote: > On 01/07/16 19:10, Ethan Merritt wrote: > > I do not know why the filledcurves style is failing in conjunction with > > smoothing, but a work-around is to plot first to a datablock and then plot > > the smoothed curve in a separate step: > > > > set table $SMOOTHED > > plot $original_data using col:(weight) smooth kdensity bandwidth sigma > > unset table > > plot $SMOOTHED using 1:2 with filledcurves y=0 > > Many thanks Ethan for the quick reply and the work-around. I got it working > (https://github.com/romangrothausmann/gnuplot/blob/5f513bf1cf81c1709ff450e2830c8c59b76d2c80/hist-ar%2Bkd.gp) > > but the resulting plot of the "filled table" is kind of "ragged" when saved to > SVG. See attached compressed SVG for the test data created with: > gnuplot -e "datafile='test.dat'; outfile='test.svg'; bin=10; sigma=3.5; xmin=0; > xmax=180; col=1; sep=','; xlabel='test'" hist-ar+kd.gp > > Any idea how to avoid this raggedness? Sorry, that is in part a consequence of the work-around. I think the issue is that you are using a partially transparent fill. The intended behaviour (that isn't working) is to draw the entire curve as one large semi-transparent area. The workaround causes it to be drawn instead as a series of adjacent semi-transparent quadrilaterals. Whenever there is an imperfect join between two adjacent quadrilaterals due to coordinate round-off, there can be a glitch in rendering. This glitch is more evident when the fill area is transparent, so one thing you could try is to make the fill style "solid" rather than "transparent solid". Ethen |