plotSetXRange

Purpose

Sets the range for the X-axis.

Format

plotSetXRange(&myPlot, x_min, x_max)
Parameters:
  • &myPlot (struct pointer) – A plotControl structure pointer.
  • x_min (Scalar) – minimum limit of the x-axis.
  • x_max (Scalar) – maximum limit of the x-axis.

Examples

// Declare plotControl structure
struct plotControl myPlot;

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

// Set X-axis to to range from -5 to +5
plotSetXRange(&myPlot, -5, 5);

// Create and plot data using our x-range
x_1 = rndn(100, 1);
x_2 = rndn(100, 1);

plotScatter(myPlot, x_1, x_2);

Remarks

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 Tools > Preferences > Graphics menu. See the GAUSS Graphics chapter for more information on the methods available for customizing your graphs.