Skip to content

Instantly share code, notes, and snippets.

@marcelcaraciolo
Created August 30, 2013 12:19
Show Gist options
  • Save marcelcaraciolo/6389296 to your computer and use it in GitHub Desktop.
Save marcelcaraciolo/6389296 to your computer and use it in GitHub Desktop.
import itertools
import matplotlib.pyplot as plt
import numpy as np
colors = itertools.cycle(['r','g','b','c','y','m','k'])
markers = itertools.cycle(['o','s','v'])
fig = plt.figure()
ax = fig.add_subplot(111)
for i in range(5):
x = np.linspace(0, 2*np.pi)
y = np.sin(x) + np.random.randn(*x.shape)
ax.plot(x, y, c=colors.next(), marker=markers.next())
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment