sufman
Posts: 2
Joined: Thu Nov 29, 2012 1:39 pm

matplotlib without x

Thu Nov 29, 2012 1:46 pm

Hello all,

I am new to this forum. I am using the R-Pi to produce some graphs.

I am using matplotlb and numpy (pre installed) on Occidentallis (basically raspbian)

However I have found it works when I startx and run the python code from within the GUI. But is there a way to run it without "startx"?

Current the end of the errors I get are:

Code: Select all

_tkinter. TclError: no display name and no $DISPLAY environment variable
note: that is not all of the errors but seems the most relevant.

Thanks for any help :D

User avatar
fdion
Posts: 307
Joined: Sun Sep 16, 2012 2:33 pm
Location: North Carolina, USA
Contact: Website

Re: matplotlib without x

Thu Nov 29, 2012 6:21 pm

You can use xvfb python script.py

I posted a more detailed answer with a graph here:
http://www.raspberry-python.blogspot.co ... erver.html

François
Francois
http://raspberry-python.blogspot.com - http://www.3dFutureTech.info - @f_dion

sufman
Posts: 2
Joined: Thu Nov 29, 2012 1:39 pm

Re: matplotlib without x

Thu Dec 06, 2012 12:55 pm

Hello

Thanks for this reply, it works but what if i wanted to run the graph in real time rather than saving it using the command show()?

Thanks for all the help!

Return to “Python”

Who is online

Users browsing this forum: Bing [Bot] and 18 guests