On Thursday 04 March 2010 13:35:12 kamaleon wrote: > Hey All, > > I have a fig, see attach image. I am plotting the number of infected nodes > versus time. Time is running from 0 to 100. > I need to insert a subplot in that figure that shows me the number of > infected nodes for time running from 0 to 20 for example. If there is an > example that can do the same thing I want please post it to me or tell me > how I can do it in matplotlib. > > Cheers. > http://old.nabble.com/file/p27780169/simbara-0%2B.41667-0-0.11-0.13-0.15-0. >18.png
I would add an additional axes 'ax2' with different x/y-limits and plot all data to this axes. ax1 = axes() ax2 = axes([0.4, 0.4, 0.4, 0.4]) # rectangle [left, bottom, width, height] in normalized (0, 1) units ax1.plot(arange(100)) draw() ax2.plot(arange(100)) draw() ax2.set_xlim(0, 20) draw() Kind regards, Matthias ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users