Mercurial > hg > octave-lyh
changeset 134:4e753587fac1
[project @ 1993-09-29 16:15:02 by jwe]
(tree_subplot_list::print (int, ostrstream&)): If the data to be
plotted is a string but it doesn't name a file, try sending it to
gnuplot directly.
author | jwe |
---|---|
date | Wed, 29 Sep 1993 16:15:02 +0000 |
parents | f8e230ec7745 |
children | 7aea883afd29 |
files | src/pt-plot.cc |
diffstat | 1 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pt-plot.cc +++ b/src/pt-plot.cc @@ -113,10 +113,6 @@ return retval; } -// We need to make sure the buffer is null-terminated because it seems -// that the libg++-2.3 ostrstream::str() function doesn\'t guarantee -// that it will be... - plot_buf << "\n" << ends; // Just testing... @@ -250,12 +246,17 @@ { plot_buf << " \"" << file << '"'; free (file); - goto have_existing_file; + goto have_existing_file_or_command; } else { free (file); file = (char *) NULL; + +// Opening as a file failed. Let's try passing it along as a plot +// command. + plot_buf << " " << data.string_value (); + goto have_existing_file_or_command; } } @@ -285,7 +286,7 @@ else return -1; - have_existing_file: + have_existing_file_or_command: if (using != (tree_subplot_using *) NULL) {