This question seems to come up regularly. I do this all the time using the
following
function:
saveBMPFl=: 3 : 0
1000 1000 saveBMPFl y.
:
bmpfl=. y. NB. Arg is .BMP file name
if. '.' e. bmpfl do.
suff=. 'U' chgCase bmpfl {.~ wh=. -(|.bmpfl)i. '.'
if. -.'BMP'-:suff do. bmpfl=. (wh}.bmpfl),'.bmp' end.
else. bmpfl=. bmpfl,'.bmp' end.
glfile_jgl2_ bmpfl
glsavebmp_jgl2_ x.
NB.EG 'surface' plot +/~ 1 o. 0.1*i.100
NB.EG 1200 1000 saveBMPFl 'bumpyPlot.bmp'
)
The last 2 lines do all the work; the x. value sets the size of the bitmap
which
is limited by the screensize settings. In other words, if I look at the
plot in
full-screen on a 1280 x 784 monitor, "1280 784" is the maximum useful bitmap
I'll be able to save - actually it's slightly smaller than this because of
the toolbar
at the bottom of the screen in Windows.
There's supposed to be a way to save .JPGs directly (using the "image3"
utilities)
but I've not been successful with this.
Devon
On 3/5/06, Anssi Seppälä <[EMAIL PROTECTED]> wrote:
>
> You can aslso output the plot to a pdf file:
> pd 'pdf plot0.pdf''
>
> At 07:11 5.3.2006, you wrote:
> >How do I put the output of 'plot' to a file (or alternatively cut and
> >paste plot output?)
>
...
--
Devon McCormick
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm