Adds a convenience method that lets you toggle any plot axis between linear and logarithmic scale with a single call. The method preserves the current view as much as possible (limits, ticks, labels) and safely handles invalid or non-positive ranges by applying sensible defaults or clamping. This makes it quick to switch scaling for better visualization of values spanning multiple orders of magnitude without rewriting plotting code.