Linked Questions

0 votes
0 answers
71 views

I have code that reads in a sensor data file & outputs a series of spectrograms augmented with added noise. The problem I'm running into is that memory usage is increasing on every iteration of ...
DrBwts's user avatar
  • 3,687
34 votes
3 answers
17k views

It seems that the standard way of creating a figure in matplotlib doesn't behave as I'd expect in python: by default calling fig = matplotlib.figure() in a loop will hold on to all the figures created,...
Shep's user avatar
  • 8,420
86 votes
2 answers
55k views

I have several matlpotlib functions rolled into some django-celery tasks. Every time the tasks are called more RAM is dedicated to python. Before too long, python is taking up all of the RAM. ...
sequoia's user avatar
  • 3,165
13 votes
5 answers
18k views

I want to save 2 figures created at different parts of a script into a PDF using PdfPages, is it possible to append them to the pdf? Example: fig = plt.figure() ax = fig_zoom.add_subplot(111) ax....
Prashanth's user avatar
  • 1,332
39 votes
2 answers
3k views

EDIT: If I explicity change the backend for matplotlib from 'Qt4Agg' to just 'Agg' then I am able to run my code with no errors. I assume this is a bug in the backend? I am writing some code for ...
FakeDIY's user avatar
  • 1,445
6 votes
2 answers
18k views

I need to create lots of figures, then use savefig to save the figure. But after about 280 pictures, it throws the exception RuntimeError: Could not allocate memory for image Is there some function ...
cxlove's user avatar
  • 91
1 vote
3 answers
3k views

So I have this program that is looping through about 2000+ data files, performing a fourier transform, plotting the transform, then saving the figure. It feels like the longer the program runs, the ...
Tim's user avatar
  • 189
1 vote
1 answer
2k views

I am trying to print a sequence of images in a code loop. I will ultimately need to print around 1000 to show how my system varies with time. I have reviewed the methods outlined in Matplotlib runs ...
ultimatejo's user avatar
1 vote
1 answer
2k views

I am having two problems, both related to memory problems. The first case happens when there are about 5 resolvers used (see code and explanation below), the second when there are used about 15 ...
Ian Fako's user avatar
  • 1,250
1 vote
0 answers
628 views

I am trying to create 60ish heatmap png files in a loop. import matplotlib.pyplot as plt from matplotlib import font_manager import seaborn as sns import pandas as pd import gcenter code here for d ...
NOnaMe's user avatar
  • 99
-1 votes
1 answer
229 views

I have 40 data sets, each about 115MB in size, and I would like to plot them all together on the same plot in log log scale. # make example data import numpy as np data_x = [] data_y = [] for _ in ...
kevinkayaks's user avatar
  • 2,736
0 votes
1 answer
186 views

If I have code like this : import matplotlib.pyplot as plt import numpy as np time_axis = np.arange(0, 30 + 1 / 50, 1 / 50) another_axis = np.arange(0, 10, 1) grid = np.zeros((len(another_axis), len(...
AnthonyML's user avatar
0 votes
0 answers
219 views

I am running a python script on a new laptop. The script, in a simple way, opens a file .fits in a loop, plots part of the file, select points from the plot, saves an output in a .dat file. import ...
Erasmo Trentin's user avatar