Try to detect, if one wants to plot vectors with
different scale vectors into the same graph. Issue a warning and skip the plot command.
This commit is contained in:
parent
f1c454c0be
commit
016c558d77
|
|
@ -898,6 +898,17 @@ plotit(wordlist *wl, char *hcopy, char *devname)
|
|||
if (ylim)
|
||||
tfree(ylim);
|
||||
|
||||
/* Sanity check: scale and vector may differ, if user assembles a single graph from different plots */
|
||||
if(!oneval) {
|
||||
int firstscalelength = vecs->v_scale->v_length;
|
||||
for (d = vecs; d; d = d->v_link2)
|
||||
if (firstscalelength != d->v_length) {
|
||||
fprintf(cp_err, "\nError: length of vector %s and its scale differ.\n", d->v_name);
|
||||
fprintf(cp_err, " cannot plot!\n");
|
||||
goto quit;
|
||||
}
|
||||
}
|
||||
|
||||
/* We don't want to try to deal with smith plots for asciiplot. */
|
||||
if (devname && eq(devname, "lpr")) {
|
||||
/* check if we should (can) linearize */
|
||||
|
|
|
|||
Loading…
Reference in New Issue