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

Skip to content

Commit c12f1fc

Browse files
committed
fixing pep8 style issues
1 parent 5a7e210 commit c12f1fc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/matplotlib/colorbar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def update_ticks(self):
372372
"""
373373
ax = self.ax
374374
ticks, ticklabels, offset_string = self._ticker()
375-
self._tick_data_values = ticks.tolist()
375+
self._tick_data_values = ticks.tolist()
376376
if self.orientation == 'vertical':
377377
ax.yaxis.set_ticks(ticks)
378378
ax.set_yticklabels(ticklabels)

lib/matplotlib/tests/test_colorbar.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,16 @@ def test_colorbar_ticks():
297297
orientation='horizontal', ticks=clevs)
298298
assert len(cbar.ax.xaxis.get_ticklocs()) == len(clevs)
299299

300+
300301
@cleanup
301302
def test_colorbar_get_ticks():
302-
#test feature for #5792
303+
# test feature for #5792
303304
I = np.random.random((100, 100))
304305
fig, ax = plt.subplots()
305306
im = ax.imshow(I, cmap=plt.cm.jet)
306-
cbar1 = fig.colorbar(im, ax=ax, ticks = [0.1,0.5,0.7])
307-
cbar2 = fig.colorbar(im, ax=ax, orientation = "horizontal", ticks = [0.1,0.5,0.7])
307+
cbar1 = fig.colorbar(im, ax=ax, ticks=[0.1, 0.5, 0.7])
308+
cbar2 = fig.colorbar(im, ax=ax, orientation="horizontal",
309+
ticks=[0.1, 0.5, 0.7])
308310
cbar3 = fig.colorbar(im, ax=ax)
309311
assert cbar1.get_ticks() == cbar1._ticker()[0].tolist()
310312
assert cbar2.get_ticks() == cbar2._ticker()[0].tolist()

0 commit comments

Comments
 (0)