|
From: Jacques B. <jac...@on...> - 2005-01-14 10:11:09
|
Petr Mikulik <mikulik <at> physics.muni.cz> writes: > This behviour is fine with me, just there should be an int_error("nothing to > plot") if there was only a single (empty) file to plot. Please update your > patch, add taking care of 3d plots. In that case, you get this: warning: no valid data points found in specified file all points y value undefined! Clear enough, isn't it? > What should happen here: > plot x*x, 'empty.dat' You get this: warning: no valid data points found in specified file x range is invalid So you have to use, for example: plot [-1:1] x*x, 'empty.dat' The titles x*x and 'empty.dat' are shown, but only x*x is plotted. Not bad. ---------------------------------------------------------------------------- Ethan Merritt <merritt <at> u.washington.edu> writes: > It's more complicated that that. The first thing that will happen > if you just change int_error into int_warn is likely to be a > divide-by-zero error as the autoscaling fails. That doesn't happen. If an empy datafile is plotted alone, you get: warning: no valid data points found in specified file all points y value undefined! > Beyond that, there > is the question of consistent behaviour of the plot. > For instance, "skipping" a plot should not change the color > assignments of the remaining plots. There is no change of color. There is no "skipping" (the title of an empty plot is still there). ---------------------------------------------------------------------------- Hans-Bernhard Broeker <broeker <at> physik.rwth-aachen.de> writes: > But the plot command, as given, still is wrong. An entire dataset is > missing --- there'll consequently be all kinds of strange behaviour on the > plot, which are pretty much guaranteed to make the resulting diagram at > least hard to interpret, possibly unusable. Only the points are missing. The title of each empty dataset is still there. So the plot command is _not_ wrong. > If so, then it's a grave bug in the generator that it didn't notice it > just created a datafile without any data in it. The bug is not in the generator but in gnuplot. An empty datafile is not wrong. > That would cause a new problem: gnuplot would now try to generate a plot, > even if *none* of the files in the plot contain any data. No plot is generated in that case. You just get this message: all points y value undefined! And in fact, that behavior doesn't suit me: I would like gnuplot to generate a plot with no point in it, but with a title and labels (the x and y ranges must be set in that case of course). I use gnuplot to plot real time data, and I draw only the data of the last minutes. If in that time there is no data at all, I want to see the plot all the same (and I certainly don't want gnuplot to stop). --------------------------------------------------------------------------- SUMMARY: I can't see any drawback in my small patch. But it is no enough. It should be possible to plot an empty datafile (everything but the points). |