Вообщем ситуация следующая, рисую я графики с помощью mathplot, много порядка 11 тысяч, это графики посещаемости минутные и часовые. Ругается mathplot сначало говорит
C:\Python27\lib\site-packages\matplotlib\pyplot.py:424: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).
max_open_warning, RuntimeWarning)
потом подвисает вылетает и пишет
Fail to allocate bitmap
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
tried to delete photo image when instances still exist
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Что посоветуете как быть??
вот код функции которая рисует
def paint_all(self, dir): dir = dir self.count_cord() dir = os.path.join(dir) if not os.path.isdir(dir): os.makedirs(dir) #Paint Mins Graf t_min = self.all_min_count.keys() s_min = self.all_min_count.values() #grid(True) figure() plot(t_min, s_min) savefig(os.path.join(dir, "all_mins.png")) #Paint Hours Graf t_hour = self.all_hour_count.keys() s_hour = self.all_hour_count.values() #grid(True) figure() plot(t_hour, s_hour) savefig(os.path.join(dir, "all_hours.png")) #Paint Id mins for tid in self.tid_min_count.keys(): t_min = self.tid_min_count[tid].keys() s_min = self.tid_min_count[tid].values() grid(True) figure() plot(t_min, s_min) savefig(os.path.join(dir, str(tid)+"_min.png")) #Paint id hours for tid in self.tid_hour_count.keys(): t_hour = self.tid_hour_count[tid].keys() s_hour = self.tid_hour_count[tid].values() grid(True) figure() plot(t_hour, s_hour) savefig(os.path.join(dir, str(tid)+"_hour.png"))
Рисует не больше 500 штук

а надо 10 к