Linked Questions
13 questions linked to/from Matplotlib runs out of memory when plotting in a loop
0
votes
0
answers
71
views
What is causing this memory usage increase? [duplicate]
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 ...
34
votes
3
answers
17k
views
Create a figure that is reference counted
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,...
86
votes
2
answers
55k
views
How can I release memory after creating matplotlib figures
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.
...
13
votes
5
answers
18k
views
is it possible to append figures to Matplotlib's PdfPages?
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....
39
votes
2
answers
3k
views
Matplotlib and Pyplot.close() not releasing memory? - backend related Qt4Agg
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 ...
6
votes
2
answers
18k
views
How to clear the cache in Matplotlib for python
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 ...
1
vote
3
answers
3k
views
What is the fastest/most efficient way to loop through a large collection of files and save a plot of the data?
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 ...
1
vote
1
answer
2k
views
Python memory when plotting figures in a loop
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 ...
1
vote
1
answer
2k
views
Matplotlib running out of memory
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 ...
1
vote
0
answers
628
views
Memory issue during creating heatmap plot in a loop
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 ...
-1
votes
1
answer
229
views
How to reduce memory overhead of multiple overlaid matplotlib loglog plots?
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 ...
0
votes
1
answer
186
views
pcolormesh and memory use after adding to plot
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(...
0
votes
0
answers
219
views
Possible memory leak in Python script
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 ...