From: John C. <jo...@jc...> - 2015-07-15 14:21:36
|
Hello all. I had MatPlotLib 1.3.1 installed, and decided to upgrade to 1.4.3. I compiled the .tar.gz package, which went without a hitch (except for a number of warnings from gcc). Installation also completed without problems. But, on running the same simple plot I was working on, no plot was output: import matplotlib.pyplot as plt def test_plot(): x = range(11) y = [x0**2 for x0 in x] plt.plot(x, y, 'o:', fillstyle='none', label = "1", ms = 10) plt.legend() plt.show() def main(args): test_plot() return 0 if __name__ == '__main__': import sys sys.exit(main(sys.argv)) which was somewhat annoying, as I was trying to help out someone on Stackoverflow. Only after experimenting somewhat, I found that setting the Agg to GtkAgg, the plot started working again: import matplotlib matplotlib.use('GtkAgg') Is this normal? I'm not actually using gtk in this project. TkAgg also works. John |