One quick reply: Daniele Nicolodi, on 2013-10-24 21:03, wrote: > One thing I dislike is, for example, the add_subplot() method: > > f = plt.figure() > a = f.add_subplot(111) > a.plot(x, y) > > it feels completely out of place (why I need to add a subplot if the > only thing I want to do is to create a figure with a single plot in it?) > and kind of magic (what is the number 111?). f, a = plt.subplots() a.plot(x, y)
that's the way to go there. And if you need to make a regular grid of subplots, you can pass it the number of rows and number of columns, and get a 2D array of subplots out for the second argument. f, axes = plt.subplots(2,3) axes[0,2].plot(range(10)) axes[1,1].plot(-np.arange(10)) f.canvas.draw() best, -- _ / \ A* \^ - ,./ _.`\\ / \ / ,--.S \/ \ / `"~,_ \ \ __o ? _ \<,_ /:\ --(_)/-(_)----.../ | \ --------------.......J Paul Ivanov http://pirsquared.org ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel