Eric, Thanks a lot for the pointers. Sorry for the double posting.
I tried fill_between, which works better than bar graph. But I need to change the data set to be able to get the filling into a nicely-formed rectangle, and the performance is still not very good. As the below example shows: import matplotlib.mlab as mlab from matplotlib.pyplot import figure, show import numpy as np x1 = np.arange(0.0, 10000.0, 0.1) y1 = np.sin(2*np.pi*x1) fig = figure() ax1 = fig.add_subplot(111) x = [] for i in x1: x += [i-0.05, i-0.05, i, i+0.05, i+0.05] y = [] for i in y1: y += [0, i, i, i, 0] ax1.fill_between(x, 0, y) I have also tried step, but it doesn't seem to be able to fill the rectangular area. Am I missing something? Kun Eric Firing wrote: > On 05/02/2010 05:48 PM, Kun Hong wrote: > >> Hi, >> >> I am new to matplotlib. So if I ask sth stupid, please bear with me. >> >> I am using matplotlib to present large data set in different graph >> types, >> bar, dot, line, etc. I find that the bar graph has very bad performance. >> Say, I draw data points of about ten thousand. Using dot graph, it draws >> in a second. But using bar graph, it draws in tens of seconds. >> >> I was wondering what causes this difference. Is there a way to improve >> the >> bar graph performace? (Maybe I am not drawing it right, then, please >> give >> me a pointer) >> >> > > Also check out step(). > http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.step > > Eric > > ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users