Skip to content

Commit 5c11d2c

Browse files
committed
MNT: Explicitly disable minor ticks on Skew-T example
With 2.0, we now get minor ticks on log plots that don't span a full decade (like this one if we go 1000 to 100). Just turn them off.
1 parent da9e5d5 commit 5c11d2c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/api/skewt.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ def upper_xlim(self):
146146

147147
if __name__ == '__main__':
148148
# Now make a simple example using the custom projection.
149-
from matplotlib.ticker import ScalarFormatter, MultipleLocator
149+
from matplotlib.ticker import (MultipleLocator, NullFormatter,
150+
ScalarFormatter)
150151
import matplotlib.pyplot as plt
151152
from six import StringIO
152153
import numpy as np
@@ -248,6 +249,7 @@ def upper_xlim(self):
248249

249250
# Disables the log-formatting that comes with semilogy
250251
ax.yaxis.set_major_formatter(ScalarFormatter())
252+
ax.yaxis.set_minor_formatter(NullFormatter())
251253
ax.set_yticks(np.linspace(100, 1000, 10))
252254
ax.set_ylim(1050, 100)
253255

0 commit comments

Comments
 (0)