gnuplot.c, add 'noretraceplot' to prevent retracing of

the graph if plotting against a vetor which is not the
original scale vector ('plot vec1 vs vec2')
This commit is contained in:
h_vogt 2016-09-10 16:44:25 +02:00 committed by rlar
parent 191de728d4
commit ec91dcb61e
1 changed files with 2 additions and 1 deletions

View File

@ -253,6 +253,7 @@ ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlab
(void) fclose(file);
/* Write out the data and setup arrays */
bool mono = (plottype == PLOT_MONOLIN);
dir = 0;
prev_xval = NAN;
for (i = 0; i < scale->v_length; i++) {
@ -265,7 +266,7 @@ ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlab
yval = isreal(v) ?
v->v_realdata[i] : realpart(v->v_compdata[i]);
if (i > 0 && scale->v_plot && scale->v_plot->pl_scale == scale) {
if (i > 0 && (mono || (scale->v_plot && scale->v_plot->pl_scale == scale))) {
if (dir * (xval - prev_xval) < 0) {
/* direction reversal, start a new graph */
fprintf(file_data, "\n");