semilogy — Plot data with a logarithmic y-axis for exponential trends, decay curves, and MATLAB semilogy workflows.
semilogy uses the standard RunMat line-plot path and then marks the active y-axis as logarithmic. It is a natural fit for exponential decay, growth curves, and magnitude data that spans orders of magnitude along Y while preserving MATLAB semilogy call forms.
How semilogy works in RunMat
- The returned value is a numeric line handle.
- Only the y-axis is switched to log scale; the x-axis remains linear.
- Y log-mode state is subplot-local and does not leak into other subplot axes.
- Positive y-values are the meaningful domain for a logarithmic y-axis.
Examples
Plot an exponential decay on a logarithmic y-axis
t = linspace(0, 10, 200);
semilogy(t, exp(-t));Compare multiple decays on the same axes
t = linspace(0, 10, 200);
h1 = semilogy(t, exp(-t));
set(h1, 'DisplayName', 'exp(-t)');
hold on;
h2 = semilogy(t, exp(-0.3*t));
set(h2, 'DisplayName', 'exp(-0.3t)');
legend;Inspect the y-axis scale after plotting
t = 0:0.1:4;
semilogy(t, exp(t));
ax = gca;
get(ax, 'YScale')Expected output:
ans =
'log'Related functions to explore
These functions work well alongside semilogy. Each page has runnable examples you can try in the browser.
Open-source implementation
Unlike proprietary runtimes, every RunMat function is open-source. Read exactly how semilogy works, line by line, in Rust.
- View semilogy.rs on GitHub
- Learn how the runtime works
- Found a bug? Open an issue with a minimal reproduction.
About RunMat
RunMat is an open-source runtime that executes MATLAB-syntax code — faster, on any GPU, with no license required.
- Simulations that took hours now take minutes. RunMat automatically optimizes your math for GPU execution on Apple, Nvidia, and AMD hardware. No code changes needed.
- Start running code in seconds. Open the browser sandbox or download a single binary. No license server, no IT ticket, no setup.
- A full development environment. GPU-accelerated 2D and 3D plotting, automatic versioning on every save, and a browser IDE you can share with a link.