|
From: Eric F. <ef...@ha...> - 2010-01-20 19:04:28
|
Jae-Joon Lee wrote: > On Wed, Jan 20, 2010 at 12:12 PM, Mario Mech <me...@me...> wrote: >> the smallest value (0.0) is labeled with "-0.0". I just want to get rid of the minus sign. >> > > This is because the actual value is "-9.00000000e-06" (this inherits > from the levels of contour). The reason for this fudge in contour is that contourf fills lower < z <= upper for each consecutive pair of contour levels. When the minimum value of z coincides with the lowest level, then regions with that minimum are left blank; so the lowest level is adjusted downward slightly, making the lowest contour interval include the minimum value. The fudge could be made optional via a kwarg, e.g., include_minimum=True (default) or False (to defeat the fudge). This would not help Mario, though, assuming he is happy with the present contouring, and simply wants sane labeling of the 0-tick. For that, a Formatter adjustment is the simplest solution. Eric |