Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## matplotlib-users

 [Matplotlib-users] mpl_toolkits.axes_grid.Grid: How to draw an " axis grid" inside each plot? From: Cesar Enrique Garcia Dabo - 2010-10-25 15:04:34 ``` Hi! I am using mpl_toolkits.axes_grid.Grid to plot for plots together using the following code inspired in a matlotlib example: import matplotlib.pyplot as plt from mpl_toolkits.axes_grid import Grid import numpy as np im = np.arange(0,3, 0.01) fig = plt.figure(1, (8., 8.)) grid = Grid(fig, 111, nrows_ncols = (2, 2)) for i in range(4): grid[i].plot(im, np.sin(im)) grid[i].grid(True) plt.show() It works "almost" fine, except for the line grid[i].grid(True) which doesn't draw the axis grid defined by the ticklabels. When using add_subplot instead of Grid it works properly, tough, like this: import matplotlib.pyplot as plt from mpl_toolkits.axes_grid import Grid import numpy as np im = np.arange(0,3, 0.01) fig = plt.figure(1, (8., 8.)) subplot = fig.add_subplot(111) subplot.plot(im, np.sin(im)) subplot.grid(True) plt.show() How is it possible to get the same result within each grid[i]? Thank you very much in advance! Enrique ```
 Re: [Matplotlib-users] mpl_toolkits.axes_grid.Grid: How to draw an " axis grid" inside each plot? From: Jae-Joon Lee - 2010-10-25 15:23:40 ```On Tue, Oct 26, 2010 at 12:04 AM, Cesar Enrique Garcia Dabo wrote: >  It works "almost" fine, except for the line >    grid[i].grid(True) >  which doesn't draw the axis grid defined by the ticklabels. When using > add_subplot instead of Grid it works properly, tough, like this: > I believe this is a bug that has been fixed in a new release. What version of matplotlib are you using. With matplotlib v1.0, use of axes_grid1 is recommended. i.e., from mpl_toolkits.axes_grid1 import Grid Anyhow, w/ v1.0, both axes_grid and axes_grid1 works. Regards, -JJ ```