You may want to choose among log, semi-log, or ordinary linear scale axes. Use the logxy command:
You can also omit the x or y flag to leave the scaling of that axis unchanged:
changes the y axis to a log scale, leaving the x axis scaling unchanged.
The flags returned by the limits function include the current logxy settings, if you need them in a program.
Zero or negative values in your data have no catastrophic effects with log axis scaling; Yorick takes the absolute value of your data and adds a very small offset before applying the logarithm function. As a side effect, you lose any indication of the sign of your data in a log plot. If you insist you need a way to get log axis scaling for oscillating data, write a function to treat negative points specially. For example, to draw positive-y portions solid and negative-y portions dashed, you might use a function like this:
You always have the option of plotting the logarithm of a function, instead of using log axes:
plots the same curve as
The log axis scaling merely changes the position of the ticks and their labels; the y axis ticks will look like a slide rule scale in the first case, but like an ordinary ruler in the second.