With Maple 2022 latest improvements its very unlikely that units are wrong in plots unless labels with units are manually entered or useunits is used. Your alternative is like driving a car without safey belts. Once you get used to it you start feeling unsafe. In this particular case useunits works only partially
plot(%, t = -Unit('s') .. 2*Unit('s'), useunits = [ms, mW/mm^2]);
which is a new type of use error not possible before.
PS.: I should have expanded a bit more why I am interest in using max/min. It's a simple way of clipping the amplitude. Piecewise can become complicated. It looks to me that plot does not recognize that the max statement in my original expression is
unitfree dimensionless and strips of all units when it encouters functions like max
plot(%, t = -Unit('s') .. 2*Unit('s'));
that would otherwise return unevaluated as
There are probably more cases with a similar behavior. I was hoping for a kind of uneval trick that would make plot throw an error (prevent stripping of all units) if statements are used that do not evaluate numerically.