Ask Your Question

Revision history [back]

You can use the matplotlib function FormatStrFormatter. This uses old-style Python formatting. The first argument is for the x-axis, the second for the y-axis. Using None gives the default setting.

sage: P = plot(exp(0.017*x), (x,0,2000))
sage: from matplotlib.ticker import FormatStrFormatter
sage: P.SHOW_OPTIONS['tick_formatter']=(None, FormatStrFormatter('%d'))
sage: P

I think it looks pretty horrible this way, and I would stick with scientific notation, as Emmanuel Charpentier said.

You can use the matplotlib function FormatStrFormatter. This uses old-style Python formatting. The first argument is for the x-axis, the second for the y-axis. Using None gives the default setting.

sage: P = plot(exp(0.017*x), (x,0,2000))
sage: from matplotlib.ticker import FormatStrFormatter
sage: P.SHOW_OPTIONS['tick_formatter']=(None, FormatStrFormatter('%d'))
sage: P

I think it looks pretty horrible this way, and I would stick with scientific notation, as Emmanuel Charpentier said.