[Matplotlib-users] Plot data for a 24 by 16 array of subplots and allow zooming into any one of them.

2012-04-18 Thread hari jayaram
Hi
I am fairly new to matplotlib.

I have 384 x,y plots that I want to arrange into a 24 by 16 array of
subplots with each subplot being at-least 4 inches by 4 inches.

I am creating the figure using  a large size so that everything will fit

fig = plt.figure(figsize=(96,64),dpi=72)

I then have my for loop go through my data-structure and add the
subplots to this figure. In addition , each subplot has four
data-ranges plotted into it.

ax = fig.add_subplot(24,16,index + 1)
par1 = ax.twinx()
par2 = ax.twinx()
par3 = ax.twinx()
par4 = ax.twinx()
par1.plot(xs,ys,o,xcalc,ycalc)
par2.plot(xcalc,my_derivative,color=black)
par4.plot(xcalc,my_unsmooth_derivative,color=cyan)

In the present form I create a one pane window that shows all 384
plots and then navigate between the plots using pan.

My question is : Is there a more elegant way to do this? . Is there a
way instead to create a small shrunken down figure and then zoom in
one cell at a time?. The figure navigation controls only zoom with
respect to an axes. Is there a way to zoom w.r.t the whole figure
interactively.


Thanks for your help

Hari

--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Plot data for a 24 by 16 array of subplots and allow zooming into any one of them.

2012-04-18 Thread Benjamin Root
On Wed, Apr 18, 2012 at 12:40 PM, hari jayaram hari...@gmail.com wrote:

 Hi
 I am fairly new to matplotlib.

 I have 384 x,y plots that I want to arrange into a 24 by 16 array of
 subplots with each subplot being at-least 4 inches by 4 inches.

 I am creating the figure using  a large size so that everything will fit

 fig = plt.figure(figsize=(96,64),dpi=72)

 I then have my for loop go through my data-structure and add the
 subplots to this figure. In addition , each subplot has four
 data-ranges plotted into it.

 ax = fig.add_subplot(24,16,index + 1)
 par1 = ax.twinx()
 par2 = ax.twinx()
 par3 = ax.twinx()
 par4 = ax.twinx()
 par1.plot(xs,ys,o,xcalc,ycalc)
 par2.plot(xcalc,my_derivative,color=black)
 par4.plot(xcalc,my_unsmooth_derivative,color=cyan)

 In the present form I create a one pane window that shows all 384
 plots and then navigate between the plots using pan.

 My question is : Is there a more elegant way to do this? . Is there a
 way instead to create a small shrunken down figure and then zoom in
 one cell at a time?. The figure navigation controls only zoom with
 respect to an axes. Is there a way to zoom w.r.t the whole figure
 interactively.


 Thanks for your help

 Hari


mpl_toolkits.axes_grid1 can allow you to share all of the axes.  All x
and y lims will be the same and any change to one will reflect everywhere
else.  Does that help?

Ben Root
--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users