8000 Hide Axis in pong example. · matplotlib/matplotlib@c83c415 · GitHub
[go: up one dir, main page]

Skip to content

Commit c83c415

Browse files
committed
Hide Axis in pong example.
1 parent 36c6632 commit c83c415

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/event_handling/pipong.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,10 @@ class Game:
124124
def __init__(self, ax):
125125
# create the initial line
126126
self.ax = ax
127-
ax.set_ylim([-1, 1])
127+
ax.xaxis.set_visible(False)
128128
ax.set_xlim([0, 7])
129+
ax.yaxis.set_visible(False)
130+
ax.set_ylim([-1, 1])
129131
pad_a_x = 0
130132
pad_b_x = .50
131133
pad_a_y = pad_b_y = .30
@@ -168,7 +170,6 @@ def __init__(self, ax):
168170
self.res = 100.0
169171
self.on = False
170172
self.inst = True # show instructions from the beginning
171-
self.background = None
172173
self.pads = [Pad(pA, pad_a_x, pad_a_y),
173174
Pad(pB, pad_b_x, pad_b_y, 'r')]
174175
self.pucks = []

0 commit comments

Comments
 (0)
0