Determines whether each new graph is drawn in a new graph tab or re-uses a pre-existing graph tab.


plotSetNewWindow(&myPlot, new_window)
  • &myPlot (struct pointer) – A plotControl structure pointer.
  • new_window (scalar) – 1 to create a new graph tab or 0 to re-use.


// Declare plotControl structure
struct plotControl myPlot;

// Initialize plotControl structure
myPlot = plotGetDefaults("xy");

// Set graph to create a new graph tab
new_window = 1;
plotSetNewWindow(&myPlot, new_window);

// Create data
x = seqa(0.1, 1, 50);
y = sin(x)~cos(x);

// Plot the data in a new graph tab window
plotXY(myPlot, x, y);


To open a new graph window once, use plotOpenWindow(). This function sets an attribute in a plotControl structure. It does not affect an existing graph, or a new graph drawn using the default settings that are accessible in the main application window from the Tools > Graphics > Preferences menu. See the GAUSS Graphics chapter for more information on the methods available for customizing your graphs.