Controls the settings for the Z-axis label on a surface plot.


plotSetZLabel(&myPlot, label[, font[, fontSize[, fontColor]]])
  • &myPlot (struct pointer) – A plotControl structure pointer.

  • label (string) – the new label.

  • font (string) – Optional argument, font or font family name.

  • fontSize (scalar) – Optional argument, font size in points.

  • fontColor (string) – Optional argument, named color or RGB value.


// Declare plotControl structure
struct plotControl myPlot;

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

// Set the Z-axis label, label font, font size, and color
plotSetZLabel(&myPlot, "Depth", "verdana", 10, "black");

// Create data
x = seqa(-10.6, .3, 71)';
y = seqa(-12.4, .35, 71);
z = sin(sqrt((x/2)^2+(y/2)^2)) ./ sqrt(x^2+y^4);
z = z .* sin(x/3);

// Plot the data
plotSurface(myPlot, x, y, z);


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.