-
-
Save pmarshwx/072c8612f313e8ea2355 to your computer and use it in GitHub Desktop.
Marker Update Example
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
#!/usr/bin/env python | |
import numpy as np | |
import matplotlib.pyplot as plt | |
fig1 = plt.figure(figsize=(8,8)) | |
ax1 = fig1.add_subplot(111) | |
ax1.set_aspect(2) | |
fig1.canvas.draw() | |
fig2 = plt.figure(figsize=(8,8)) | |
ax2 = fig2.add_subplot(111) | |
ax2.set_position(ax1.get_position()) | |
ax2.set_xlim(0, 5) | |
ax2.set_ylim(0, 5) | |
for i in range(6): | |
print(i) | |
pt = ax2.plot(i, i, 'ko') | |
fig2.canvas.draw() | |
fig2.savefig('%i' % (i), dpi=100, bbox_inches='tight') | |
del pt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment