plotSetNewWindow#
Purpose#
Determines whether each new graph is drawn in a new graph tab or re-uses a pre-existing graph tab.
Format#
- plotSetNewWindow(&myPlot, new_window)#
- Parameters:
&myPlot (struct pointer) – A
plotControl
structure pointer.new_window (scalar) – 1 to create a new graph tab or 0 to re-use.
Examples#
// 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);
Remarks#
To open a new graph window once, use plotOpenWindow()
.
Note
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 from the
menu.
See also
Functions plotOpenWindow()
, plotSetTitle()
, plotSetLinePen()