plot window does not open - matplotlib-users - Matplotlib
plot window does not open Community matplotlib-users _Ashish_Asgekar November 7, 2008, 6:43pm 1 Hello, I am running Python 2.5.2 on Fedora Core 7. recently removed previous versions of Scipy and Numpy (installed previously using YUM), and compiled and installed their latest versions using the source code. i also installed MatPlotLib from source. their versions are given below: Python 2.5.2 Numpy 1.1.0 Scipy 0.6.0 MatPlotLib 0.98.3 WxPython I try simple plot commands as the ones below. however, no plot window appears anywhere. i think i am doing something really silly here, like not linking to backend (see the error message below). i have looked at matplotlibrc file in my home area ~/matplotlib/.matplotlibrc plz suggest some remedy. thanks, ashish --------------------------------------- code import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.ylabel('some numbers') plt.show() ··· ------------------------------------------- ------------------------------------------- response in Python Python 2.5 (r25:51908, Nov 6 2007, 16:54:01) [GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2 Type "help", "copyright", "credits" or "license" for more information. import matplotlib.pyplot as plt plt.plot([1,2,3]) [<matplotlib.lines.Line2D object at 0xa7ff2cc>] plt.ylabel('some numbers') <matplotlib.text.Text object at 0xa7d21ec> plt.show() ------------------------------------------- -- ----------------------------------------------------------------------------- Dr.
Ashish Asgekar Physics Group, BITS Pilani-Goa Campus, Zuarinagar, Goa. India 403 726 Ph: +91-832-2580 410 : +91-832-2557 024 Fx: +91-832--255 7033 www.bits-goa.ac.in/Departments/Physics/Faculty.htm ----------------------------------------------------------------------------- Michael_Droettboom1 November 7, 2008, 7:27pm 2 I didn't see any error messages in your mail... You can determine the backend you're set to by doing: >>> import matplotlib >>> matplotlib.get_backend() 'GTKAgg' If it's 'PDF', 'Ps', 'SVG', 'Agg', or 'Cairo', it's a non-gui backend, and therefore no gui window will be displayed.
This is usually set by the "backend" parameter in ~/.matplotlib/matplotlibrc. Often the default backend is set to Agg if no GUI frameworks were found at compile time. Given the recent version of matplotlib you're running, I assume you built from source? You may need to install a gui framework (from Fedora's yum repos should be recent enough) and rebuild matplotlib. Mike Ashish Asgekar wrote: ··· Hello, I am running Python 2.5.2 on Fedora Core 7. recently removed previous versions of Scipy and Numpy (installed previously using YUM), and compiled and installed their latest versions using the source code. i also installed MatPlotLib from source. their versions are given below: Python 2.5.2 Numpy 1.1.0 Scipy 0.6.0 MatPlotLib 0.98.3 WxPython I try simple plot commands as the ones below. however, no plot window appears anywhere. i think i am doing something really silly here, like not linking to backend (see the error message below). i have looked at matplotlibrc file in my home area ~/matplotlib/.matplotlibrc plz suggest some remedy. thanks, ashish --------------------------------------- code import matplotlib.pyplot as plt plt.plot([1,2,3]) plt.ylabel('some numbers') plt.show() ------------------------------------------- ------------------------------------------- response in Python Python 2.5 (r25:51908, Nov 6 2007, 16:54:01) [GCC 4.1.2 20070925 (Red Hat 4.1.2-27)] on linux2 Type "help", "copyright", "credits" or "license" for more information. import matplotlib.pyplot as plt plt.plot([1,2,3]) [<matplotlib.lines.Line2D object at 0xa7ff2cc>] plt.ylabel('some numbers') <matplotlib.text.Text object at 0xa7d21ec> plt.show() ------------------------------------------- -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA