Ask Your Question
1

Change tick mark format for y-axis to 10^n

asked 2015-03-23 19:58:42 +0100

calc314 gravatar image

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.

edit retag flag offensive close merge delete

Comments

I 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...

kcrisman gravatar imagekcrisman ( 2015-03-23 21:27:45 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-03-24 16:04:23 +0100

calc314 gravatar image

Thanks @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$']].

edit flag offensive delete link more

Comments

Great! But why not try this: http://stackoverflow.com/questions/11...

kcrisman gravatar imagekcrisman ( 2015-03-25 02:10:22 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-03-23 19:58:42 +0100

Seen: 653 times

Last updated: Mar 24 '15