ylabel
ylabel(text, [align=])
Input: text, align · Output: no output
What it is
Labels the current panel's y-axis with text (string). align= (string, "left"/"center"/"right", plus "bottom"/"top" for the rotated text, default "center") sets alignment. While yyaxis right is active, labels the *right* axis instead of the left one.
Overloads
One call shape — this function is not overloaded.
| Code | Input | Output | Description |
ylabel(text, [align=]) | text stringLabels the current panel's y-axis with text (string).align string, optionalalign= (string, "left"/"center"/"right", plus "bottom"/"top" for the rotated text, default "center") sets alignment. | no output | While yyaxis right is active, labels the *right* axis instead of the left one. |
Examples
From the documentation, and run by the build -- the output and the figure below are what the engine actually produced. Simplest first.
scatterfit(t, y, 2) # degree-2 polynomial fit through the scatter
xlabel("x")
ylabel("y")
from plotting
plot(t, noisy, color = "#b0b0b0")
plot(t, signal, color = "#0072BD")
xlabel("time [s]")
ylabel("amplitude")
savefig("my-first-figure.pdf")
output
· plot: figure 1 (1000 points)
· plot: figure 2 (1000 points)
· savefig my-first-figure.pdf
note: this figure uses screen styling and may not hold up in print -- call theme("publication") before saving for a paper (said once per session)from start-here
plot(v, v .^ 2)
xlabel("x")
ylabel("x^2")
grid on
savefig("squares.pdf")
output
· plot: figure 1 (2 points)
· savefig squares.pdf
note: this figure uses screen styling and may not hold up in print -- call theme("publication") before saving for a paper (said once per session)from fundamentals
Fs = 1000
n = 0:1:1023
t = n / Fs
x = sin(2*pi*80*t) + sin(2*pi*300*t)
spectrogram(x, 128, 32, Fs)
title("Two stationary tones")
xlabel("time (s)")
ylabel("frequency (Hz)")
from numerics-dsp