Skip to content

Instantly share code, notes, and snippets.

@pmarshwx
Created May 27, 2011 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmarshwx/072c8612f313e8ea2355 to your computer and use it in GitHub Desktop.
Save pmarshwx/072c8612f313e8ea2355 to your computer and use it in GitHub Desktop.
Marker Update Example
#!/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