# Plotting with logarithmic scaling for the 'x' axis?

 1 Hey! Would appreciate very much a bit of help: I have an Array of data of Positions Vs. Time intervals, where Time goes from 0 to 10000, and every slot on the array represents a time interval of 100. The question is - is there any way to plot the data in the array using List_plot...show(), but with a logarithmic scaled 'x' axis ? Meaning - labels running as - 10^(-4), 10^(-3), ..., 10^5? Thank you! asked Jun 24 '12 Anonymous

 5 There is a ticket for such a thing at http://ask.sagemath.org/question/675/how-do-i-create-a-log-plot-of-line-data. From the notes there, it is not quite ready. You can see the answer to a similar question at log-log plots. Matplotlib has a LogFormatter that you also might be able to use, but I haven't got it working at the moment. It does not appear that using the tick_formatter in show will let you call this LogFormatter, but I might be missing something here. posted Jun 24 '12 calc314 2200 ● 7 ● 25 ● 62 1Actually, http://trac.sagemath.org/sage_trac/ticket/4529 has positive review! Hopefully it will still apply on Sage 5.1. You are right that you have to be a little carefully about the formatters - see the patches at that ticket for more info.kcrisman (Jun 25 '12)
 3 Since Sage 5.2 it's as simple as list_plot(data_array, scale='semilogx') # Logarithmic scale for X-axis list_plot(data_array, scale='semilogy') # Logarithmic scale for Y-axis list_plot(data_array, scale='loglog') # Logarithmic scale for both axes  posted Aug 03 '12 v_2e 219 ● 1 ● 12 ● 30

[hide preview]

## Stats:

Seen: 293 times

Last updated: Aug 04 '12