plotSetYPen#
Purpose#
Sets the thickness, color, and style for the Y-Axis line.
Format#
- plotSetYPen(&myPlot, thickness[, clr[, style]])#
- Parameters:
&myPlot (struct pointer) – A
plotControlstructure pointer.thickness (Scalar) – the thickness of the axis line in pixels.
clr (string) – Optional argument, name or rgb value of the new color for the axes.
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#
// Declare plotControl structure
struct plotControl myPlot;
// Initialize plotControl structure
myPlot = plotGetDefaults("xy");
// Set axis to be 3 pixels wide and black
plotSetYPen(&myPlot, 3, "black");
// Create data
x = seqa(0.1, 0.1, 50);
y = sin(x)~cos(x);
// Plot the data with the new line colors
plotXY(myPlot, x, y);
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
menu.
The axis updated by this function is determined by the value previously specified by plotSetActiveY(). The accepted values are "left" (default), "right", and "both".
Future calls to plotSetActiveY() will not retroactively change the values of a previously modified axis.
See also
Functions plotSetActiveY(), plotSetLinePen(), plotSetAxesPen(), plotSetXPen()