Browse Source

enable variable 'nolegend' for gnuplot

pre-master-46
Holger Vogt 5 years ago
parent
commit
7b9d1fb74a
  1. 12
      src/frontend/plotting/gnuplot.c

12
src/frontend/plotting/gnuplot.c

@ -61,7 +61,7 @@ void ft_gnuplot(double *xlims, double *ylims,
struct dvec *v, *scale = NULL;
double xval, yval, prev_xval, extrange;
int i, dir, numVecs, linewidth, gridlinewidth, err, terminal_type;
bool xlog, ylog, nogrid, markers;
bool xlog, ylog, nogrid, markers, nolegend;
char buf[BSIZE_SP], pointstyle[BSIZE_SP], *text, plotstyle[BSIZE_SP], terminal[BSIZE_SP];
char filename_data[128];
@ -138,6 +138,13 @@ void ft_gnuplot(double *xlims, double *ylims,
markers = FALSE;
}
if (!cp_getvar("nolegend", CP_BOOL, NULL, 0)) {
nolegend = FALSE;
}
else {
nolegend = TRUE;
}
/* Make sure the gridtype is supported. */
switch (gridtype) {
case GRID_LIN:
@ -249,6 +256,9 @@ void ft_gnuplot(double *xlims, double *ylims,
if (gridlinewidth > 1)
fprintf(file, "set border lw %d\n", gridlinewidth);
if(nolegend)
fprintf(file, "set key off\n");
if (plottype == PLOT_COMB) {
strcpy(plotstyle, "boxes");
} else if (plottype == PLOT_POINT) {

Loading…
Cancel
Save