How to Plot a Logarithmic Scale Axis in SciDAVis

Data that spans orders of magnitude — concentrations from nanomolar to millimolar, frequencies from hertz to megahertz, light intensities in a decay curve — collapses into an unreadable L-shape on a linear axis. The fix is a logarithmic axis, and in SciDAVis it is a two-click setting. This tutorial covers enabling log scales, setting up minor ticks, controlling tick spacing, and the traps that catch beginners. Back to all tutorials.

Version note: written for v2.9.x (SourceForge binaries are 2.8). The axis-scale dialogs are unchanged between the two. The menu path below is confirmed against the official SciDAVis Handbook (Format menu → Scales).

Step 1 — Switch the axis to logarithmic

  1. Create your plot normally (select X and Y columns, Plot menu, e.g. Scatter or Line).
  2. Double-click the axis you want to change — or open Format → Scales from the menu bar. Both open the same dialog.
  3. In the Scales tab, select the axis (Bottom, Left, Right, or Top) and change its Type from linear to logarithmic.
  4. Adjust the range so it covers whole decades (e.g. 1 to 10000 rather than 3 to 8000) — log axes read cleanest on decade boundaries.

For a semi-log plot (one log axis, one linear — the classic for exponential decays and dose-response curves), change only one axis. For a log-log plot (power laws, spectra spanning decades), switch both X and Y to logarithmic.

Step 2 — Set up minor ticks

Major ticks on a log axis sit at each power of ten (1, 10, 100, …). The smaller ticks between them — at 2, 3, … 9 × 10n — are the minor ticks, and they are what make a log axis readable.

  1. In the same Format → Scales dialog, find the tick settings for your logarithmic axis.
  2. Set the number of minor ticks (the secondary ticks between major ones). For a base-10 log axis, 8 minor ticks per decade gives the familiar 2–9 subdivisions.
  3. Enable minor tick marks on the axis display so they actually draw.

Honest limitation: SciDAVis delegates tick placement to the Qwt plotting library, and tick counts are treated as hints, not strict orders — Qwt may choose a slightly different number of ticks than you typed if it thinks the result looks better. If you need exact tick positions, use the step method instead: the Scales tab lets you switch from “number of ticks” to a fixed step between major ticks, which pins positions deterministically. This is the officially documented route for non-standard tick spacing.

Step 3 — Add grid lines that follow the log scale

  1. Open Format → Grid.
  2. Enable grid lines for the logarithmic axis. You can choose grid lines at major ticks only, or at both major and minor ticks.
  3. For log-log plots, a light grid at minor ticks is the standard journal look — it lets readers interpolate between decades.

Grid frequency follows the tick settings from the Scales tab, so set your ticks first, then the grid.

Common pitfalls

ProblemWhy it happensFix
Axis is empty or the curve vanishesLog of zero or negative values is undefined — Qwt cannot draw themFilter out zeros/negatives from the plotted columns, or start the axis range above zero
Tick labels show 1e+03 instead of 1000Automatic numeric format switches to scientific notationAdjust the axis numeric format/precision in the axis settings, or use the superscript format option
Minor ticks don’t appear where expectedQwt treats tick counts as hints (see above)Use the step method for deterministic spacing
Straight line looks “wrong” on log-logIt’s not wrong — a straight line on log-log means a power law (y = ax^b), slope = exponent bRead the slope as the exponent; that’s the point of the plot

Log scale or log-transformed data?

Two different operations, often confused:

  • Logarithmic axis (this tutorial): your data stays as-is; only the axis is drawn logarithmically. The plotted points keep their original values — tooltips, fits, and exports all use real numbers. This is what you want 95% of the time.
  • Log-transformed data: you create a new column with log10(y) via Table → Add Function and plot that on a linear axis. Needed only when the analysis itself (a linear fit, statistics) must run in log space.

Prefer the logarithmic axis: it is reversible, honest, and keeps your table clean.

Next steps: fit a model to your curve with nonlinear curve fitting (fits run on the real data values regardless of axis scale), or combine log axes with multi-layer arrangements such as twin y-axes. Finished? Export the figure for publication.

This page is maintained by an independent community resource site and is not affiliated with the SciDAVis developers. Menu paths verified against the official SciDAVis Handbook.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *