Skip to content

Commit d386470

Browse files
author
y-p
committed
CLN: revert matrix plot ticks to traditional arrangement
1 parent e1ea3f1 commit d386470

File tree

1 file changed

+8
-23
lines changed

1 file changed

+8
-23
lines changed

pandas/tools/plotting.py

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -154,29 +154,14 @@ def scatter_matrix(frame, alpha=0.5, figsize=None, ax=None, grid=False,
154154
ax.set_xlabel('')
155155
ax.set_ylabel('')
156156

157-
ax.xaxis.set_visible(False)
158-
ax.yaxis.set_visible(False)
159-
160-
# setup x axis labels
161-
if i == 0 and j % 2 == 1:
162-
# first row, odd column
163-
_label_axis(ax, kind='x', label=b, position='top', rotate=True)
164-
elif i == n - 1 and j % 2 == 0:
165-
# last row, even column
166-
_label_axis(ax, kind='x', label=b, position='bottom', rotate=True)
167-
168-
# setup y axis labels
169-
if j == 0 and i % 2 == 0:
170-
# first column, even row
171-
_label_axis(ax, kind='y', label=a, position='left')
172-
elif j == n - 1 and i % 2 == 1:
173-
# last column, odd row
174-
_label_axis(ax, kind='y', label=a, position='right')
175-
176-
# ax.grid(b=grid)
177-
178-
# axes[0, 0].yaxis.set_visible(False)
179-
# axes[0, n - 1].yaxis.tick_right()
157+
_label_axis(ax, kind='x', label=b, position='bottom', rotate=True)
158+
159+
_label_axis(ax, kind='y', label=a, position='left')
160+
161+
if j!= 0:
162+
ax.yaxis.set_visible(False)
163+
if i != n-1:
164+
ax.xaxis.set_visible(False)
180165

181166
for ax in axes.flat:
182167
setp(ax.get_xticklabels(), fontsize=8)

0 commit comments

Comments
 (0)