Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jacky Lin
CSCI365-Generative Adversarial Networks
Commits
c3c3572c
Commit
c3c3572c
authored
Apr 22, 2021
by
Jacky Lin
Browse files
a
parent
ebc15b30
Changes
1
Hide whitespace changes
Inline
Side-by-side
ipynb/Untitled.ipynb
deleted
100644 → 0
View file @
ebc15b30
%% Cell type:code id: tags:
```
python
%
matplotlib
widget
import
numpy
as
np
import
matplotlib.pyplot
as
plt
from
matplotlib.animation
import
FuncAnimation
import
time
k
=
np
.
random
.
uniform
(
size
=
10
)
fig
,
ax
=
plt
.
subplots
()
xdata
,
ydata
=
[],
[]
ln
,
=
plt
.
plot
([],
[],
'ro'
)
def
init
():
ax
.
set_xlim
(
0
,
1
)
ax
.
set_ylim
(
0
,
1
)
return
ln
,
def
update
(
i
):
xdata
.
append
(
k
[
i
])
ydata
.
append
(
k
[
i
])
ln
.
set_data
(
k
[
i
],
k
[
i
])
time
.
sleep
(
1
)
return
ln
,
ani
=
FuncAnimation
(
fig
,
update
,
frames
=
len
(
k
)
+
1
,
init_func
=
init
,
blit
=
True
)
plt
.
show
()
```
%%%% Output: display_data
%% Cell type:code id: tags:
```
python
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment