plotSetXGrid#
Purpose#
Controls the settings for the background grid of a plot on the X-Axis.
Format#
- plotSetXGrid(&myPlot, tickStyle[, color])#
- plotSetXGrid(&myPlot, onOff)
- Parameters:
&myPlot (struct pointer) – A
plotControl
structure pointer.tickStyle (string) – specifies whether grid marks should be drawn on major x-axis tick marks. Options: [
"major"
,"minor"
,"both"
].color (string) – Optional argument, name or rgb value of the new color.
onOff (string) – turns the grid on or off. Options: [
"on"
,"off"
]. If used, this must be the only argument passed to the function besides theplotControl
structure pointer.
Examples#
// Declare plotControl structure
struct plotControl myPlot;
// Initialize plotControl structure
myPlot = plotGetDefaults("scatter");
// Set grid to be black and on the major ticks only
plotSetXGrid(&myPlot, "major", "black");
// Create a scatter plot of random data
plotScatter(myPlot, seqa(1, 1, 10 ), rndn(10, 1));
Remarks#
Please note that plotSetXGrid()
is not supported for bar, box, or histogram plots.
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 plotSetGrid()
, plotSetXGridPen()
, plotSetYGrid()