plotSetWhichXAxis#
Purpose#
Assigns curves to the top or bottom x-axis.
Format#
- plotSetWhichXAxis(&myPlot, which)#
- Parameters:
&myPlot (struct pointer) – A
plotControlstructure pointer.which (string or Nx1 string array) – where each element contains either
"top"or"bottom".
Examples#
// Declare plotControl structure
struct plotControl myPlot;
// Initialize plotControl structure
myPlot = plotGetDefaults("xy");
// Set up the top x-axis with a different range
plotSetActiveX(&myPlot, "top");
plotSetXRange(&myPlot, 0, 100);
plotSetXLabel(&myPlot, "Top axis");
// Set up the bottom x-axis
plotSetActiveX(&myPlot, "bottom");
plotSetXRange(&myPlot, 0, 10);
plotSetXLabel(&myPlot, "Bottom axis");
// Assign line 1 to the bottom x-axis, line 2 to the top x-axis
plotSetWhichXAxis(&myPlot, "bottom" $| "top");
// Create data
x = seqa(0.1, 0.1, 50);
y = sin(x)~cos(x);
// Plot the data
plotXY(myPlot, x, y);
Remarks#
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 plotSetWhichYAxis(), plotSetAxesPen()