[plt-scheme] Plot: Resizing and saving the plot

From: Williams, M. Douglas (M.DOUGLAS.WILLIAMS at saic.com)
Date: Tue Dec 6 10:35:07 EST 2005

Noel,

An update from the e-mail I sent you.

I use the PLoT package quite extensively in the science and simulation
collections and got pretty good and using and extending it - for example
there are extensions for 1d and 2d histograms in the science collection.  I
actually like it for quick and dirty analysis within PLT Scheme.

How can I make this graph bigger?

There are height and width options (which default to 300 and 400,
respectively) for the plot routine.  For example, 

(plot (line sin)
        (width 800))

gives a long kind of skinny plot (height = 300, width = 800).

How can I save it to disk?

The plot routine returns an instance of (a sub-class of) image-snip%.  The
get-bitmap method on image-snip% returns the bitmap.  The save-file method
on bitmap% allows you to save them.  That is how I save the graphics for my
documentation.  (Or you can use out-file as Jay suggests in his post.)

I will write this up and put it in the Cookbook.  It will be a good exercise
to force me to actually use it.

Doug

> 
> I'm attempting to use PLoT for some data analysis (and also
> to test out 299.407).  I have 13'200 points, which are
> squished into a tiny little graph in DrScheme's
> interactions window.  How can I make this graph bigger, and
> how can I save it to disk?  Or should I abandon PLoT in
> favour of a spreadsheet/Matlab?
> 
> TIA,
> Noel
> 


Posted on the users mailing list.