pylab plot_date problem

Shah Sultan Alam ssalam at gmail.com
Thu Mar 19 07:02:37 CET 2009


Hi ,
 I am using following code to create a graph
def plot_plot():
  ax = pylab.subplot(111)
        for count in range(len(yaxes_values)):
                pylab.subplots_adjust(left=0.13, bottom=0.21,
right=0.90, top=0.90,wspace=0.20, hspace=0.20)

ax.plot_date(id_dates,yaxes_values[count],fmt='o-',label=titleList[count])
                pylab.xlabel('Time Stamp')
                pylab.ylabel('Values')


ax.xaxis.set_major_locator(pylab.MinuteLocator(interval=Interval))
                ax.xaxis.set_major_formatter(formatter)
                labels = ax.get_xticklabels()
                pylab.setp(labels, rotation=90, fontsize=8)
                ax.set_title(choice)
        pylab.grid()
        font= FontProperties(size='x-small');
        pylab.legend(loc=0, prop=font)


each time I am re-initilliziing the "titleList" before calling the
plot_plot , This works fine for one graph,
But if I call it more then once the label keep appending ..
How to get rid of this ?

Regds
Shah Alam



More information about the Python-list mailing list