Dave (from the UK) science forum addict
Joined: 12 Jan 2006
Posts: 76
|
Posted: Thu Jun 01, 2006 1:57 am Post subject:
Testing if an expression produces graphics.
|
|
|
I've written a front end to mathematica, but it needs the user to decide
in advance if the output will be text or graphics. If its graphics, it
will then Export[] it as a jpeg.
So for example
1+1 is not saved as a jpeg, but
Plot[Sin[c],{x,0,12}]
is actually converted to
Export["foo.jpg", Plot[Sin[c],{x,0,12}] ]
At the minute, as I write my application has two buttons "Text" and
"Graphical"
Non-working example at:
http://www.althorne.org/test/witm.php
(PS, don't try reaching that page with a PDA, as there is some *broken*
code that detects mobile devices.)
so the user must decide - hardly elegant it must be said.
Ideally I'd like something like that automatically if the output is
graphical or not, and if so puts the commands inside an Export[].
Any ideas?
--
Dave K MCSE.
MCSE = Minefield Consultant and Solitaire Expert.
Please note my email address changes periodically to avoid spam.
It is always of the form: month-year@domain. Hitting reply will work
for a couple of months only. Later set it manually.
http://witm.sourceforge.net/ (Web based Mathematica frontend) |
|