yewtc
Posts: 4
Joined: Sat Nov 23, 2013 12:03 pm

No plots

Sat Nov 23, 2013 12:08 pm

I am getting nothing displayed from a plot command. I am using vnc to access the desktop remotely, but nothing gets displayed. Am I missing a "standard" image viewer? I get no diagnostics, Merely :
Out[6]= -Graphics-

Steve

geev03
Posts: 44
Joined: Thu Jun 07, 2012 12:40 pm
Location: London, UK

Re: No plots

Sat Nov 23, 2013 1:38 pm

Have a look under /home/... that is where I saw mine. i.e. after executing a ' In[7]:= Export["abcd.png",p] ', search for abcd.png .
Image
Attachments
wolfram_output.jpg
wolfram_output
wolfram_output.jpg (47.08 KiB) Viewed 6681 times

yewtc
Posts: 4
Joined: Sat Nov 23, 2013 12:03 pm

Re: No plots

Sat Nov 23, 2013 6:04 pm

That's helpful, but I was expecting "Show" to work - which is doesn't. At least not for me.

Steve

User avatar
DougieLawson
Posts: 30444
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: No plots

Sat Nov 23, 2013 7:51 pm

Try following the Mathematica 101 lessons http://www.wolfram.com/broadcast/screen ... dsonstart/
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

MoosePi
Posts: 112
Joined: Wed Nov 06, 2013 4:42 pm

Re: No plots

Sat Nov 23, 2013 9:00 pm

DougieLawson wrote:Try following the Mathematica 101 lessons http://www.wolfram.com/broadcast/screen ... dsonstart/
I was interested but could not view the web page because it requires Flash Player, great !!
Pi Forum Search and Google yields answers to many questions

User avatar
DougieLawson
Posts: 30444
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: No plots

Sat Nov 23, 2013 9:16 pm

MoosePi wrote:
DougieLawson wrote:Try following the Mathematica 101 lessons http://www.wolfram.com/broadcast/screen ... dsonstart/
I was interested but could not view the web page because it requires Flash Player, great !!
Works for me on my Win81 machine.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

mpwagner
Posts: 1
Joined: Sun Nov 24, 2013 11:40 am

Re: No plots

Sun Nov 24, 2013 11:47 am

I run Rasbian with X over HDMI
and ran the default Mathematica install
put get:

In[3]:= p=Plot[Sin[x],{x,0,2 Pi}]
Out[3]= -Graphics-
In[4]:= Export["testplot.png",p]
Developer`LaunchFrontEnd::nxsrv: An x server is required for that operation.
Rasterize::nofe: A front end is not available; Rasterize requires a front end.
Out[4]= $Failed

Does anybody have an idea what's wrong in the configuration?
(I'm not an linux expert, sorry!)

Many thanks - mpw

sharix
Posts: 200
Joined: Thu Feb 16, 2012 11:29 am
Location: Slovenia

Re: No plots

Mon Nov 25, 2013 8:56 pm

It seems you have no X server running (or that Mathematica does not detect it). See this discussion on how to work with graphics without an X server: http://www.raspberrypi.org/phpBB3/viewt ... 94&t=61501

Arnoud
Posts: 9
Joined: Thu Jul 18, 2013 3:52 pm

Re: No plots

Mon Nov 25, 2013 9:27 pm

Steve,

After you install the 'wolfram-engine' package with apt-get, there are two commands that launch an interface to the Wolfram Language:
  • wolfram -- which launches a simple text only interface in your shell.
  • mathematica -- which launches a desktop application interface.
The text interface launched with 'wolfram' does not display graphics (it just shows -Graphics- in the output); you can still export those graphics (as gif, png, jpeg, etc).

The desktop application interface does display graphics in its windows (called notebook documents).

DixonB
Posts: 1
Joined: Sun Dec 22, 2013 7:03 pm

Re: No plots

Sun Dec 22, 2013 7:14 pm

If you're only seeing Wolfram under the Education submenu (and not Mathematica), you might try installing another program. For some reason, at least on my version of Rasbian, installing wolfram-engine only places the Wolfram link in the menu system. Installing another piece of software (like emacs, for instance), updates the menu so Mathematica appears. Magic! Once you launch Mathematica, you should have no problem displaying graphics. Don't forget, however, to press <Shift><Return> to process your command.

I'm using a very old reference to Mathematics, version 2.0, but am amazed to see that almost all the commands from that era (almost 20 years ago) still work. A few packages have been replaced or updated but otherwise it runs great on my Pi. In fact, this free distribution of Mathematica is worth the price of the system.

User avatar
algorithm
Posts: 150
Joined: Mon Nov 25, 2013 9:09 pm
Location: Flatland

Re: No plots

Tue Feb 21, 2017 3:28 pm

Arnoud wrote:The text interface launched with 'wolfram' does not display graphics (it just shows -Graphics- in the output); you can still export those graphics (as gif, png, jpeg, etc).
This does not work for me. I connect via SSH to a headless Pi with hdmi_force_hotplug=1 / hdmi_group=2 / hdmi_mode=85 in /boot/config.txt to enable VNC connections. I then start the text-based Mathematica interface with "wolfram". Plot output displays as "-Graphics-" as expected. But Export["plot.png",p] fails with "Can't open display :25". I then have to use ^C leading to "Interrupt during LinkConnect>" and type "quit" to return to the shell prompt. It works well via VNC but everything is muuuuch sloooowerrrrrr, of course, so I wanted to use the text-based interface via ssh.

User avatar
algorithm
Posts: 150
Joined: Mon Nov 25, 2013 9:09 pm
Location: Flatland

Re: No plots

Sun Feb 26, 2017 11:27 am

algorithm wrote:This does not work for me. I connect via SSH to a headless Pi with hdmi_force_hotplug=1 / hdmi_group=2 / hdmi_mode=85 in /boot/config.txt to enable VNC connections. I then start the text-based Mathematica interface with "wolfram". Plot output displays as "-Graphics-" as expected. But Export["plot.png",p] fails with "Can't open display :25". I then have to use ^C leading to "Interrupt during LinkConnect>" and type "quit" to return to the shell prompt. It works well via VNC but everything is muuuuch sloooowerrrrrr, of course, so I wanted to use the text-based interface via ssh.
Apparently this got fixed in the apt-get dist-upgrade of Mathematica I got yesterday! There is also a new "wolframscript" program, so this works a treat and is just what I needed:

Code: Select all

wolframscript -c 'Export["plot.png",Plot[Sin[x],{x,0,2 Pi}]]'
(The ExportString example from the wolframscript man page didn't work for me, or rather it resulted in unreadable images.)

Return to “Mathematica”

Who is online

Users browsing this forum: No registered users and 1 guest