[11973] in Athena Bugs
decmips 7.6G: Matlab 4.1
daemon@ATHENA.MIT.EDU (Jon Klaren)
Thu Apr 21 19:07:45 1994
To: bugs@MIT.EDU
Date: Thu, 21 Apr 94 19:07:38 EDT
From: Jon Klaren <jjklaren@MIT.EDU>
System name: w20-575-61
Type and version: KN02ca 7.6G
Display type: PMAG-DV
What were you trying to do?
I was trying to create an encapsulated postscript file of a
Matlab figure with a bitmap preview included. The command I used was:
print -deps -epsi filename.eps
What's wrong:
The problem is that if the current figure is not full, i.e. if
'subplot' was used, then the encapuslated postscript file is made with a
tight bounding box around the region of interest, while the bitmap
preview is made of the entire figure, with no bounding box.
What should have happened:
The same bounding box should be used for both the encapsulated
postscript part and the bitmap preview part. My intent was to overlay
other objects on top of the postscript, using the bitmap preview as a
guide, in xfig. This doesn't work, because the preview doesn't
accurately reflect the encapsulated postscript. If 'subplot' is not
used, or the figure is full (all subaxes have something plotted on them)
then I presume the bitmap preview is an accurate representation of the
encapsulated postscript.
Please describe any relevant documentation references:
To reproduce this error, try the following:
In Matlab,
>> foo = 1:20;
>> subplot(221);
>> plot(foo);
>> print -deps -epsi foo.eps
In XFIG,
1. Import eps object by clicking on 'eps object'
2. Select a box size.
3. In the dialog box that pops up, select filename: foo.eps
4. click 'apply'
5. click 'use orig size'
6. click 'done'
7. a bounding box the size of the picture will have the plot in the
upper left corner (It should fill the space if it worked right)
8. Draw a line in xfig directly along the line in the plot.
9. print out the figure, to demonstrate the difference in the line you
drew vs. where you thought the plot would appear.
- Jon Klaren