Created
February 26, 2018 13:34
-
-
Save Vindaar/7349cf37c3cb96d9b1dfa809d3b5ce4f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# same as the Julia example, but in Python | |
# I hope I made no mistake (mistaking an attribute as a | |
# function or something like this while converting it | |
# from the Julia to Python. Didn't test it) | |
def draw_new_frame(fig, cb, image, frame, file) | |
image.set_data(frame) | |
# get the filename written prev. | |
texts = fig.texts | |
for i in range(len(texts)): | |
# and remove each | |
texts[1].remove() | |
# write new filename | |
fig.text(0.4, 0.9, file) | |
# scale the colorbar | |
#image[:autoscale]() | |
image.set_clim(0, 100) | |
cb.update_normal(image) | |
fig.canvas.draw() | |
plt.draw() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment