On 05/04/2012 07:13 PM, stecue wrote:
> Hi,
>
> I'm plotting figures for a series of data set and I want to keep the
> looking consistent with each other. Currently I'm using MaxNLocator and
> ScalarFormatter but still,
>
> 1. Is there a way to limit the minimum number of ticks for MaxNLocator?
> Currently, if I set nbins=5, the number of ticks varies from 2 to 5. The
> variation is too large for me. I tried FixedLocator but then I lost the
> ability to set "ylim" (or "xlim") automatically.

You cannot limit it directly to a given number, but you can make it 
stick closer to the max number by giving it more latitude in selecting 
what can be a tick.  You do this via the "steps" kwarg.
>
> 2. About the scientific notation of ScalarFormatter, can I fix the
> number of decimal places? Currently, the notation will be "2x10^-5" in
> some figures, while "2.50x10^-5" in other figures. I need all tick
> labels to have the same number of decimal places.

It sounds like you need to use a FormatStrFormatter instead of a 
ScalarFormatter.

Eric

>
> I've searched the online documents for hours but cann't find the
> answer... any ideas?
>
> Thanks!
>



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to