plotSetYTicInterval

Purpose

Controls the interval between y-axis tick labels and also allows the user to specify the first tick to be labeled.

Format

plotSetYTicInterval(&myPlot, ticInterval[, firstLabeled])
Parameters:
  • &myPlot (struct pointer) – A plotControl structure pointer.

  • ticInterval (scalar) – the distance between y-axis tick labels.

  • firstLabeled (scalar) – Optional input, the value of the first Y-value on which to place a tick label.

Examples

XY plot

// Create the sequence 0.25, 0.5, 0.75...3
x = seqa(0.25, 0.25, 12);
y = sin(x);

// Declare plotControl structure
// and fill with default settings for XY plots
struct plotControl myPlot;
myPlot = plotGetDefaults("xy");

// Place the first Y-tick label at 0.5
// and place additional ticks every 0.25 after
plotSetYTicInterval(&myPlot, 0.25, 0.5);

// Draw plot with applied Y-tick settings
plotXY(myPlot, x, y);
_images/psyti1.png

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 Tools > Preferences > Graphics menu.