Eval: subplots from RExpression overly condensed
Using nightly build 14 Apr 08 under WinXP. The code below generates a publication-quality graphic when run from the R command line. When run in an RExpression actor, however the results are pretty unattractive.
Case 1: With an imageJ actor connected, the resulting RExpressionNUM.png is extremely compressed. i.e., there is lots of white space and the subplots are cramped.
Case 2: With no imageJ actor, and the "Automatically display graphics" button checked, the resulting pdf is less cramped than the png, but still not as well-proportioned as that coming directly from R.
Note: resizing the graphic does not help - proportions remain the same
- test code for RExpression actor subplot generation
- get data and variables in order...
names(wtloss) ; attach(wtloss) ;
w<-Weight ; d<-Days ;
- set up stacked subplotting environment, plot top fig
par(mfrow=c(2,1)) ; plot(w~d) ;
res<-lm(w~d) ; abline(res) ;
- plot bottom fig
r<-residuals(res) ; plot(d,r) ;
- return to default graphics, clean up
#1 Updated by Dan Higgins almost 11 years ago
Differences in graphs created by R depend on the graphics device (i.e. png file, pdf file, or R plotting window and the device settings. RExpression automatically creates on png or pdf files. The size is set as parameters, but maybe some of the other settings should be varied.
Ideally we would create a Java R graphics device that would be displayed by the core Kepler java code. This would require some better integration of R with Kepler, but would also allow (theoretically) interactive manipulation of plots.