Browse Source

no plotting, only saving to file

if gnuplot_terminal is eps/quit or png/quit
pre-master-46
Holger Vogt 7 years ago
parent
commit
8efa08602a
  1. 44
      src/frontend/plotting/gnuplot.c

44
src/frontend/plotting/gnuplot.c

@ -223,21 +223,23 @@ ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlab
fprintf(file, "set format y \"%%g\"\n"); fprintf(file, "set format y \"%%g\"\n");
fprintf(file, "set format x \"%%g\"\n"); fprintf(file, "set format x \"%%g\"\n");
fprintf(file, "plot ");
i = 0;
/* Write out the gnuplot command */
for (v = vecs; v; v = v->v_link2) {
scale = v->v_scale;
if (v->v_name) {
i = i + 2;
if (i > 2) fprintf(file, ",\\\n");
fprintf(file, "\'%s\' using %d:%d with %s lw %d title ",
filename_data, i-1, i, plotstyle, linewidth);
quote_gnuplot_string(file, v->v_name);
if ((terminal_type != 3) && (terminal_type != 5)) {
fprintf(file, "plot ");
i = 0;
/* Write out the gnuplot command */
for (v = vecs; v; v = v->v_link2) {
scale = v->v_scale;
if (v->v_name) {
i = i + 2;
if (i > 2) fprintf(file, ",\\\n");
fprintf(file, "\'%s\' using %d:%d with %s lw %d title ",
filename_data, i - 1, i, plotstyle, linewidth);
quote_gnuplot_string(file, v->v_name);
}
} }
fprintf(file, "\n");
} }
fprintf(file, "\n");
/* terminal_type /* terminal_type
1: do not print an eps or png file 1: do not print an eps or png file
@ -263,7 +265,21 @@ ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlab
} }
if ((terminal_type == 3) || (terminal_type == 5)) { if ((terminal_type == 3) || (terminal_type == 5)) {
fprintf(file, "replot\n");
fprintf(file, "plot ");
i = 0;
/* Write out the gnuplot command */
for (v = vecs; v; v = v->v_link2) {
scale = v->v_scale;
if (v->v_name) {
i = i + 2;
if (i > 2) fprintf(file, ",\\\n");
fprintf(file, "\'%s\' using %d:%d with %s lw %d title ",
filename_data, i - 1, i, plotstyle, linewidth);
quote_gnuplot_string(file, v->v_name);
}
}
fprintf(file, "\n");
fprintf(file, "exit\n"); fprintf(file, "exit\n");
} }

Loading…
Cancel
Save