Hi,

I'm trying to plot some data against time using the following code:

            r = mlab.csv2rec(filename)
            self.axis.plot(r.time, r.jb_sizems)
            hfmt = dates.DateFormatter('%H:%M:%S.%f')
            self.axis.xaxis.set_major_formatter(hfmt)
            self.axis.set_title("JB Size")
            self.axis.set_xlabel("Time")
            self.axis.set_ylabel("JB Size(ms)", color='b')
            self.axis.set_ylim(bottom=0)
            for tl in self.axis.get_yticklabels():
                tl.set_color('b')
            self.axis.grid()
            self.figure.autofmt_xdate()

Everything works well, except for the cases when time ranges from before
12am to after 12am. For example I have one csv file with time values
ranging from 23:04:09.367000 to 00:08:09.357000. By right I should see a 1
hour plot with x-axis ranging from 23:xx:xx.xxxxxx on the left to
00:xx:xx.xxxxxx on the right, but I got a "24 hour" plot instead with
x-axis ranging from 00:xx:xx.xxxxxx on the left to 23:xx:xx.xxxxxx on the
right. My graph therefore appeared "chopped" into 2. Anybody knows how to
fix this?

Regards,
Clare.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to