Running 0.98.5.3
(would upgrade to 1.0 but having trouble installing it on Mac OS X as it doesn't appear to like the version of Python Apple provides).
I have a module where there are two functions which call matplotlib to each create a different graph which both saved to an output PNG file. The import statements:
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
are at the top of the module file. Neither function imports anything specifically, relying on the above imports.
I call each function sequentially. The result is that the first graph is created correctly. The second graph is flawed, and in fact shows the legend from the first function. When I reverse the function calls, which ever graphing function is called first is ok, but second is flawed. If I call each function on it's own, within the same Python session, the graphs (both) get produced flawlessly.
both charts are bar charts; but one does a stacked bar and the other is a simple bar chart.
Why would I not be able to call the two functions sequentially? Why does the first call interfere with the second call?
--rms