import matplotlib.pyplot as plt import numpy as np x = [0,1,2] y = [0,1,4] fig = plt.figure() axes = fig.add_subplot(111) axes.plot(x, y) plt.show() x_highres = np.linspace(0, 2, 20) y_highres = x_highres ** 2 fig = plt.figure() axes = fig.add_subplot(111) axes.plot(x, y) axes.plot(x_highres, y_highres) plt.show() fig = plt.figure() axes = fig.add_subplot(111) axes.plot(x_highres, y_highres, "r--") #axes.plot(x_highres, y_highres, color="red", linestyle='dashed') plt.show() fig = plt.figure() axes = fig.add_subplot(111) axes.plot(x_highres, y_highres, color="red", linestyle='dashed', linewidth=3) plt.show() fig = plt.figure() axes = fig.add_subplot(111) axes.plot(x_highres, y_highres,color="red", linestyle='dashed', linewidth=3, marker='o', markerfacecolor='blue', markersize=5) plt.show() fig = plt.figure() axes = fig.add_subplot(111) axes.plot(x_highres, y_highres,color="red", linestyle='dashed', linewidth=3, marker='o', markerfacecolor='blue', markersize=5) axes.set_title('$y=x^2$') ## Notice you can you LaTeX Code ## for more about LaTeX check the Tutorial about Markdown and LaTeX axes.grid() plt.show() fig = plt.figure() axes = fig.add_subplot(111) axes.plot(x_highres, y_highres,color="red", linestyle='dashed', linewidth=3, marker='o', markerfacecolor='blue', markersize=5) axes.set_title('$y=x^2$') axes.grid() axes.set_xlabel('x') axes.set_ylabel('y') plt.show() fig = plt.figure(figsize=(12,8)) axes = fig.add_subplot(111) axes.plot(x_highres, y_highres,color="red", linestyle='dashed', linewidth=3, marker='o', markerfacecolor='blue', markersize=5) axes.set_title('$y=x^2$') axes.grid() axes.set_xlabel('x') axes.set_ylabel('y') plt.show() noise = np.random.random((128,128)) noise plt.imshow(noise) plt.show() plt.imshow(noise) plt.colorbar() plt.show() plt.imshow(noise, cmap=plt.cm.gray) plt.colorbar() plt.show() plt.imshow(noise, cmap=plt.cm.Paired) plt.colorbar() plt.show()