There is definitely something wrong with matplotlib/numpy. Consider the following
from numpy import *
I can now remove the file map.dat with (from the command line) $rm map.dat
If I plot mydata before the line
I can’t get rid of the file until I exit python!!
Does matplotlib keep a reference to the data? How can I remove this reference?