First page Back Continue Last page Overview Graphics

Previous Example with Graphs, 1

import matplotlib.gridspec as gridspec

import matplotlib.pyplot as pl

import numpy as np

pl.figure(figsize=(6, 4))

G = gridspec.GridSpec(3, 3)

X = np.linspace(0, 2 * np.pi, 50, endpoint=True)

F1 = 2.8 * np.cos(X)

F2 = 5 * np.sin(X)

F3 = 0.3 * np.sin(X)

axes_1 = pl.subplot(G[0, :])

axes_1.plot(X, F1, 'r-', X, F2)