I have another issue I can't get past--I would like to avoid plotted points and lines from extending past the grid boundaries but all tries using "set clip" command with "plot...with" argument have not worked. I haven't found a similar discussion thread on this so I need to open another ticket.
Attached is the code and the resulting plot of my data showing traces beyond the grid. Is there a clip method that works with my plot type? I've tried with points, lines, linespoints, and clip points, one, two per the help doc.
Alternative would be to use log scale for y-axis (see commented lines in code) but it complains:
gnuplot> Warning: empty y range [1:1], adjusting to [1:1.01]
Don't know why the autoscaling doesn't work, I also attached a plot with this result. What's going on here?
Thanks.
The autoscaling is only looking at your original data columns, i.e. before the "smoothing" operation. At this stage each input point has a separate x coord but they all have a y coord = 1. That's why it says "empty y range".
Let's call this a bug, and move it to the bug tracker.
As to the draw-outside-the-lines problem, it's the same sort of thing.
There are 2 stages of processing, first the input data, then the smoothed data. The bounds checking is apparently getting confused by the deferred range limit [0:*<max].
Maybe this is a bug also, but there is a clean way to make it work so maybe it just needs better documentation.
set yrange [0:*<max] writeback
plot <whatever>
set yrange restore
replot</whatever>
This forces the program to re-use the final final y range from the previous plot, after both scaling steps.
Clarification:
"set log" and "smooth freq" are intrinsically incompatible options. The log operation is applied to the input data (pre-smoothing), whereas probably everyone expects the log to be applied to the histogram curve that results from the smoothing operation.
To see what's happening compare
set auto y
unset log y
plot 'silver.dat' using 3:(1) smooth freq
set log y
plot 'silver.dat' using 3:(1) smooth freq
plot 'silver.dat' using 3:(exp(1)) smooth freq
the writeback solution worked, thanks!