plotSetYGridPen

Purpose

Controls the thickness, color, and style for the y-axis grid lines.

Format

plotSetYGridPen(&myPlot, which_grid, thickness[, clr[, style]])
Parameters
  • &myPlot (struct pointer) – A plotControl structure pointer.

  • which_grid (string) – The grid to modify, "major", "minor", or "both".

  • thickness (Scalar) – the thickness of the specified y-axis grid lines in pixels.

  • clr (string) – Optional argument, name or rgb value of the new color for the specified y-axis grid lines.

  • style (Scalar) –

    the style of the pen. Options include:

    1

    Solid line.

    2

    Dash line.

    3

    Dot line.

    4

    Dash-Dot line.

    5

    Dash-Dot-Dot line.

Examples

_images/plotsetygridpen-cr.png
// Declare plotControl structure
struct plotControl myPlot;

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

// Set grid line to be 0.5 px, black, and dashed
plotSetYGridPen(&myPlot, "major", 0.5, "Black", 2);

// Create a scatter plot of random data
plotScatter(myPlot, seqa(1, 1, 10 ), rndn(10, 1));