# HG changeset patch # User jwe # Date 785444731 0 # Node ID 4fc1ae8c24dc1bbebb2b21c31cadb654b3180db9 # Parent 8fa3c25ab27102429aaa2f7155025afe7e2a3b79 [project @ 1994-11-21 19:05:31 by jwe] diff -r 8fa3c25ab271 -r 4fc1ae8c24dc src/pt-plot.cc --- a/src/pt-plot.cc Mon Nov 21 18:37:45 1994 +0000 +++ b/src/pt-plot.cc Mon Nov 21 19:05:31 1994 +0000 @@ -61,6 +61,9 @@ // Is this a parametric plot? Makes a difference for 3D plotting. static int parametric_plot = 0; +// The gnuplot terminal type. +static char *gnuplot_terminal_type = 0; + // Should the graph window be cleared before plotting the next line? static int clear_before_plotting = 1; @@ -104,6 +107,8 @@ if (! plot_stream.is_open ()) { + initialized = 0; + plot_line_count = 0; char *plot_prog = user_pref.gnuplot_binary; @@ -138,6 +143,9 @@ { initialized = 1; plot_stream << "set data style lines\n"; + + if (gnuplot_terminal_type) + plot_stream << "set term " << gnuplot_terminal_type << "\n"; } } @@ -1147,6 +1155,15 @@ parametric_plot = 1; else if (almost_match ("noparametric", argv[1], 5)) parametric_plot = 0; + else if (almost_match ("term", argv[1], 1)) + { + delete [] gnuplot_terminal_type; + ostrstream buf; + for (int i = 2; i < argc; i++) + buf << argv[i] << " "; + buf << "\n" << ends; + gnuplot_terminal_type = buf.str (); + } } for (int i = 0; i < argc; i++)