Ask Your Question

Revision history [back]

You could rescale the data before you plot it:

sage: data = [(t^2,t^3) for t in srange(1,10,.1)]
sage: L = line2d(data)

linear plot

sage: log_data = [(log(x[0]),log(x[1])) for x in data]
sage: M = line2d(log_data)

log plot

If you want the tick marks to be logarithmic, the docstring for describes an option for using a matplotlib tick "locator".

sage: from matplotlib import ticker
sage: tloc = lambda m: ticker.LogLocator(subs=[m])

log plot with log ticks

To be honest though, I had a lot of trouble using the LogLocator -- it doesn't seem completely polished, and may take a while to understand.