ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 24 Mar 2015 20:10:22 -0500Change tick mark format for y-axis to 10^nhttp://ask.sagemath.org/question/26287/change-tick-mark-format-for-y-axis-to-10n/I would like to have the tick mark labels on the y-axis only switch from the exponential format using `e` to a format using `10^n`. For example, instead of `1e19`, I would like to see `10^19`.
I'm sure this is a `tick_formatter` thing, but it is escaping me.
Mon, 23 Mar 2015 13:58:42 -0500http://ask.sagemath.org/question/26287/change-tick-mark-format-for-y-axis-to-10n/Comment by kcrisman for <p>I would like to have the tick mark labels on the y-axis only switch from the exponential format using <code>e</code> to a format using <code>10^n</code>. For example, instead of <code>1e19</code>, I would like to see <code>10^19</code>. </p>
<p>I'm sure this is a <code>tick_formatter</code> thing, but it is escaping me.</p>
http://ask.sagemath.org/question/26287/change-tick-mark-format-for-y-axis-to-10n/?comment=26288#post-id-26288I wish, but I fear it is not. You may want to see the matplotlib documentation to see if it is easily possible; they have some algorithms for when to switch to the `e` thing, but don't know what else it does...Mon, 23 Mar 2015 15:27:45 -0500http://ask.sagemath.org/question/26287/change-tick-mark-format-for-y-axis-to-10n/?comment=26288#post-id-26288Answer by calc314 for <p>I would like to have the tick mark labels on the y-axis only switch from the exponential format using <code>e</code> to a format using <code>10^n</code>. For example, instead of <code>1e19</code>, I would like to see <code>10^19</code>. </p>
<p>I'm sure this is a <code>tick_formatter</code> thing, but it is escaping me.</p>
http://ask.sagemath.org/question/26287/change-tick-mark-format-for-y-axis-to-10n/?answer=26310#post-id-26310Thanks @kcrisman! I had to "do it by hand" in some sense. I specified the tick marks with `ticks=[[10,20],[1*10^9,2*10^9]]`. Then, I specified the labels using latex with `tick_formatter=[None,['$1.0\\times 10^9$', '$2.0\\times 10^9$']]`.
Tue, 24 Mar 2015 10:04:23 -0500http://ask.sagemath.org/question/26287/change-tick-mark-format-for-y-axis-to-10n/?answer=26310#post-id-26310Comment by kcrisman for <p>Thanks <a href="/users/41/kcrisman/">@kcrisman</a>! I had to "do it by hand" in some sense. I specified the tick marks with <code>ticks=[[10,20],[1*10^9,2*10^9]]</code>. Then, I specified the labels using latex with <code>tick_formatter=[None,['$1.0\\times 10^9$', '$2.0\\times 10^9$']]</code>.</p>
http://ask.sagemath.org/question/26287/change-tick-mark-format-for-y-axis-to-10n/?comment=26320#post-id-26320Great! But why not try this: http://stackoverflow.com/questions/11577665/change-x-axes-scale-in-matplotlibTue, 24 Mar 2015 20:10:22 -0500http://ask.sagemath.org/question/26287/change-tick-mark-format-for-y-axis-to-10n/?comment=26320#post-id-26320