## [Matplotlib-users] Newbie question - tick label number formatting

 [Matplotlib-users] Newbie question - tick label number formatting From: Peter L. Buschman - 2005-06-27 16:28:14 ```There must be a best-practice for this.... ;-) How do I control the formatting of high numbers in ticklabels? For example, with an xlim of 1,000,000 the my ticklabel at the end of my x axis reads x1e6. I'd rather have it be 1000000 since I'll only have 1 or 2 tick labels... What is the recommended way of achieving this? --PLB ```

 [Matplotlib-users] Newbie question - tick label number formatting From: Peter L. Buschman - 2005-06-27 16:28:14 ```There must be a best-practice for this.... ;-) How do I control the formatting of high numbers in ticklabels? For example, with an xlim of 1,000,000 the my ticklabel at the end of my x axis reads x1e6. I'd rather have it be 1000000 since I'll only have 1 or 2 tick labels... What is the recommended way of achieving this? --PLB ```
 Re: [Matplotlib-users] Newbie question - tick label number formatting From: Darren Dale - 2005-06-27 18:31:14 ```On Monday 27 June 2005 12:27 pm, Peter L. Buschman wrote: > There must be a best-practice for this.... ;-) > > How do I control the formatting of high numbers in ticklabels? For > example, with an xlim of 1,000,000 the my ticklabel at the end of my x axis > reads x1e6. I'd rather have it be 1000000 since I'll only have 1 or 2 tick > labels... > > What is the recommended way of achieving this? Let me make sure I understand what you are looking for. You want your ticklabels to read "1000000", "2000000", and you dont want the label at the end of axis. Is that right? If so, there are two options at the moment: 1) gca().xaxis.set_major_formatter(OldScalarFormatter()) 2) gca().set_xticklabels(('1000000','2000000')) -- Darren ```