# HG changeset patch # User jwe # Date 747291410 0 # Node ID 723cc7235104a85e5041fc448857adfda35f898f # Parent 3abd838cc4b3c0b20cbe78473842680cc09d0055 [project @ 1993-09-06 04:56:50 by jwe] (tree_subplot_list::print): If the plot data is a string and it names a file, plot the data in the file. diff -r 3abd838cc4b3 -r 723cc7235104 src/pt-plot.cc --- a/src/pt-plot.cc Mon Sep 06 04:39:26 1993 +0000 +++ b/src/pt-plot.cc Mon Sep 06 04:56:50 1993 +0000 @@ -26,6 +26,7 @@ #endif #include +#include #include #include "error.h" @@ -235,8 +236,21 @@ tree_constant data = plot_data->eval (0); if (data.is_defined ()) { + char *file = (char *) NULL; + if (data.is_string_type ()) + { + file = data.string_value (); + ifstream ftmp (file); + if (ftmp) + { + plot_buf << " \"" << file << '"'; + goto have_existing_file; + } + else + file = (char *) NULL; + } + nc = data.columns (); - char *file = (char *) NULL; switch (ndim) { case 2: @@ -262,6 +276,8 @@ else return -1; + have_existing_file: + if (using != (tree_subplot_using *) NULL) { int status = using->print (ndim, nc, plot_buf);