Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4a14291

Browse files
authored
Merge pull request #6784 from efiring/contour_locator
BUG: contourf, restore previous behavior with N=2
2 parents bee40fd + fdcf86f commit 4a14291

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ def _autolev(self, N):
11471147
if self.logscale:
11481148
self.locator = ticker.LogLocator()
11491149
else:
1150-
self.locator = ticker.MaxNLocator(N + 1)
1150+
self.locator = ticker.MaxNLocator(N + 1, min_n_ticks=1)
11511151
zmax = self.zmax
11521152
zmin = self.zmin
11531153
lev = self.locator.tick_values(zmin, zmax)

0 commit comments

Comments
 (0)