## Re: [Matplotlib-users] How to make some Spaces befor my x[0] value

 Re: [Matplotlib-users] How to make some Spaces befor my x[0] value From: Markus Feldmann - 2009-05-22 15:15:18 ```Markus Feldmann schrieb: > > to make some Plots, but my first Point lies on the beginning > of my Plot. How to make some spaces ? Ok i solved this by making, self.subplot1.set_xlim(d[0]-abs(d[-1]-d[0])/100,d[-1]+abs(d[-1]-d[0])/100) self.subplot2.set_xlim(d[0]-abs(d[-1]-d[0])/100,d[-1]+abs(d[-1]-d[0])/100) This make some more nice Spaces. Regards Markus ```

 [Matplotlib-users] How to make some Spaces befor my x[0] value From: Markus Feldmann - 2009-05-22 14:34:19 ```Hi All, i am using, def draw(self,min,max): if not hasattr(self, 'subplot1'): self.subplot1 = self.figure.add_subplot(211) self.subplot1.grid(True) self.subplot2 = self.figure.add_subplot(212) self.subplot2.grid(True) a,b,c,d,e,f,g = self.compute(min) ymin_efg = numpy.real(numpy.amin((e,f,g))) ymax_efg = numpy.real(numpy.amax((e,f,g))) self.plots2 += self.subplot1.plot(d,a, color='red') self.plots2 += self.subplot1.plot(d,a+1, color='green') self.plots2 += self.subplot1.plot(d,c+2, color='blue') self.plots += self.subplot2.plot(d,numpy.abs(e),color='red') self.plots += self.subplot2.plot(d,numpy.abs(f),color='green') self.plots += self.subplot2.plot(d,numpy.abs(g),color='blue') self.subplot1.legend((self.plots[0],self.plots[1],self.plots[2]),('Peak1','Peak2','Peak3')) self.subplot2.legend((self.plots[0],self.plots[1],self.plots[2]), ('abs(Wert von Peak1)','abs(Wert von Peak2)', 'abs(Wert von Peak3)')) self.subplot1.set_ylim([-0.5, 3.5]) self.subplot2.set_ylim([ymin_efg*1.2, ymax_efg*1.2]) to make some Plots, but my first Point lies on the beginning of my Plot. How to make some spaces ? Regards Markus ```
 Re: [Matplotlib-users] How to make some Spaces befor my x[0] value From: Markus Feldmann - 2009-05-22 15:15:18 ```Markus Feldmann schrieb: > > to make some Plots, but my first Point lies on the beginning > of my Plot. How to make some spaces ? Ok i solved this by making, self.subplot1.set_xlim(d[0]-abs(d[-1]-d[0])/100,d[-1]+abs(d[-1]-d[0])/100) self.subplot2.set_xlim(d[0]-abs(d[-1]-d[0])/100,d[-1]+abs(d[-1]-d[0])/100) This make some more nice Spaces. Regards Markus ```