Hi All,

i am programming an application which extracts binary values from 6
files and plots this values in a bar() element and another one.

The bar Elements are partial one upon the other. I think this results of
my my small x values.

y1 = [1 0]
y2 = [1 0]
y3 = [1 1]
x = [ 0.         0.0002149]

As you can see the x values are near the same.

here is a screenshot,
[url=http://img257.imageshack.us/my.php?image=problemmitkonverter.jpg][img=http://img257.imageshack.us/img257/3134/problemmitkonverter.th.jpg][/url]

My Code is at,
http://nopaste.debianforum.de/21481

here is a short code snippet:
##########################################################################
class GraphWindow(wx.Window):
     def __init__(self, *args, **kwargs):
         wx.Window.__init__(self, *args, **kwargs)
         self.lines = []
         self.figure = Figure()
         self.canvas = FigureCanvasWxAgg(self, -1, self.figure)
         f_dat = open('../../../peakswerteundzeit.dat','rb')
         nitems = 2
         self.a_time = cPickle.load(f_dat)
         self.a_a = cPickle.load(f_dat)
         self.a_b = cPickle.load(f_dat)
         self.a_c = cPickle.load(f_dat)
         self.a_ar = cPickle.load(f_dat)
         self.a_ai = cPickle.load(f_dat)
         self.a_br = cPickle.load(f_dat)
         self.a_bi = cPickle.load(f_dat)
         self.a_cr = cPickle.load(f_dat)
         self.a_ci = cPickle.load(f_dat)
         self.draw(nitems)

       def draw(self,nitems):
         if not hasattr(self, 'subplot1'):
             self.subplot1 = self.figure.add_subplot(211)
             self.subplot2 = self.figure.add_subplot(212)
         a = numpy.array(self.a_a[0:nitems])
         b = numpy.array(self.a_b[0:nitems])
         c = numpy.array(self.a_c[0:nitems])
         d = numpy.array(self.a_time[0:nitems])
         print a, b, c, d, numpy.add(a,b)
         bar1 = self.subplot1.bar(d,a, color='red', 
edgecolor='red',align='edge')
         bar2 = self.subplot1.bar(d,b, color='green', 
edgecolor='green',align='edge',
                                  bottom=a)
         bar3 = self.subplot1.bar(d,c, color='blue', 
edgecolor='blue',align='edge',
                                  bottom=numpy.add(a,b))
##########################################################################

Any Ideas how to avoid the one upon the other effect ?
I failed to get the xaxis towork.

Regards Markus


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to