From: Stephen G. <ste...@op...> - 2008-09-15 04:28:52
|
Hi Fernando, > So, I want to plot a line, but controlling the labels on the tickers > of the x axis. For instance, if I'm plotting (1000, 5), (2000, 10), > (3000, 10), the ticks on the x axis might show 1000 2000 3000 > or 1 2 3 x1e3. I want to control it, set it to 1 > and obtain the first example, and set to 1000 and obtain the second one. I not 100% clear what you want to achieve, however look into your matplotlib distribution for ticker.py There is Formatter classes that control such things. For example the existing ScalarFormatter, has a method set_scientific() to enable /disable scientific formatting. My reading of your description suggests this is what you are after or you might get some joy out of set_powerlimits() or the argument useOffset. If your requirements are different you may need to create your own formatter class. Steve |