Sets the range for the y-axis.


plotSetYRange(&myPlot, y_min, y_max)
  • &myPlot (struct pointer) – A plotControl structure pointer.
  • y_min (scalar) – minimum limit of the y-axis.
  • y_max (scalar) – maximum limit of the y-axis.


// Declare plotControl structure
struct plotControl myPlot;

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

// Set y-axis to to range from 0 to 2
plotSetYRange(&myPlot, 0, 2);

// Create and plot data using our x-range
x = rndu(100, 1);
y = rndu(100, 1);

plotScatter(myPlot, x, y);


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.