|
From: thse <t.s...@fz...> - 2016-10-26 15:21:04
|
when using the "for" loop in a "plot" command several times, e.g.
plot for [i=1:3] x-i, for [j=1:2] x-j-5
the last "for" loop sets the internal variable "highest_iteration"
in "plot2d.c" which results in missing plots when the preceding
loops have more iterations.
example (the second plot shows the error):
reset
set xrange [-10:10]
set yrange [-10:10]
plot for [i=1:3] x-i title "i=".i, for [j=1:3] x-j-5 title "j=".j
pause -1
plot for [i=1:3] x-i title "i=".i, for [j=1:2] x-j-5 title "j=".j
adding two lines to "plot2d.c" repairs this.
--- plot2d.c.orig 2016-09-28 00:00:09.000000000 +0200
+++ plot2d.c 2016-10-26 16:40:50.238197804 +0200
@@ -2966,11 +2966,13 @@
if (empty_iteration(plot_iterator) && this_plot) {
this_plot->plot_type = NODATA;
} else if (forever_iteration(plot_iterator) && (this_plot->plot_type
== NODATA)) {
+ if (plot_iterator->iteration > highest_iteration)
highest_iteration = plot_iterator->iteration;
} else if (forever_iteration(plot_iterator) && (this_plot->plot_type
== FUNC)) {
int_error(NO_CARET,"unbounded iteration in function plot");
} else if (next_iteration(plot_iterator)) {
c_token = start_token;
+ if (plot_iterator->iteration > highest_iteration)
highest_iteration = plot_iterator->iteration;
continue;
}
--
View this message in context: http://gnuplot.10905.n7.nabble.com/several-iterations-in-one-plot-result-in-sometimes-missing-overwritten-plots-tp20412.html
Sent from the Gnuplot - Dev mailing list archive at Nabble.com.
|