[kepler-dev] RExpression image output

Tristan King tristan.king at jcu.edu.au
Tue Dec 4 21:18:05 PST 2007


Hi all,
In trying to get the RExpression actor working from my web ui, I came
across the problem with the use of the R function png to create images.
this function requires an X11 session (i'm not sure what it does under
windows), and if one is unavailable the RExpression actor fails.

i changed line 330 of RExpression.java to read:
graphicsDevice = "bitmap(file = '" + graphicsOutputFile + "', type =
\"png256\", width = " + nxd + ", height = " + nyd + ")";
which allows me to run the test/R_3D_Plot.xml example, but i know very
little about R or how this actor works to know if there are going to be
any problems with other workflows in other situations.

Maybe a better solution would be to add an extra property to the actor
to specify whether X11 is available and use png if it is, and bitmap if
it's not (doing this automatically would be better, but i don't know if
it's possible to detect X11 in code).

-Tristan



More information about the Kepler-dev mailing list