Project

General

Profile

Actions

Bug #3226

open

Eval: subplots from RExpression overly condensed

Added by Kevin Drury over 16 years ago. Updated over 15 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
general
Target version:
Start date:
04/16/2008
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
3226

Description

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

  1. test code for RExpression actor subplot generation
  2. get data and variables in order...
    library(MASS) ;
    names(wtloss) ; attach(wtloss) ;
    w<-Weight ; d<-Days ;
  3. set up stacked subplotting environment, plot top fig
    par(mfrow=c(2,1)) ; plot(w~d) ;
    res<-lm(w~d) ; abline(res) ;
  4. plot bottom fig
    r<-residuals(res) ; plot(d,r) ;
  5. return to default graphics, clean up
    par(mfrow=c(1,1)) ;
    detach(wtloss) ;
Actions #1

Updated by Dan Higgins over 16 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.

Dan Higgins

Actions #2

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 3226

Actions

Also available in: Atom PDF