[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Easy way to make hard copies at full printer resolution
- Subject: Re: Easy way to make hard copies at full printer resolution
- From: davidf(at)dfanning.com (David Fanning)
- Date: Wed, 2 Sep 1998 07:40:08 -0600
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <35ED0DA9.E7B32190@risoe.dk>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:11999
Kristian Kjaer (firstname.lastname@example.org) writes:
> One thing that makes IDL somewhat inconvenient for _interactive_ data
> and reduction is the lack of a command (equivalent to - dare I say it -
> alt(File)...Print... in Windows programs) to produce a hard copy of the
> current plot with the resolution offered by the printer.
> Ideally I'd like to sit and type into the IDL command prompt, using
> native IDL
> commands and my own (wrapper, mainly) routines and, when a useful plot
> resulted on the screen, make a hard copy of it without any extra
> Does anyone have some ideas or some useful code?
At the Object-Oriented IDL Programming course I taught in Albuquerque
a couple of weeks ago we wrote, as an exercise, a forward and
backward connected linked list object. We then used that list
object in a "smart" image object so that the image could
"remember" (in any arbitrary order) what processing steps
had been executed on it. Among the numerous benefits of this
smart image was that fact that we had a multiple "undo"
feature, since we could simply delete the last item on
its "memory" list and tell the processed image to "recreate"
itself. Very, very nice.
I've since done some more work on the linked list object
and added the capability to sort, order, and interactively
edit the linked list objects. What I have been envisioning
is exactly the functionality you seem to be asking for:
a way to store, edit, and re-play a series of commands.
What is missing (and what could be added in about 10
minutes of work) is a command "player". This would simply
be an object that executed and stored the commands for
later playback. The PRINT method would look something
Device, XSize=5, YSize=4, /Inches
The commands to be executed would have to be entered like
player->cmd, 'Plot, findgen(11), Title=First Plot'
player->cmd, 'y = Sin(findgen(11))+ 0.5'
player->cmd, 'Oplot, y'
The CMD method would look something like this:
PRO Player::CMD, command
ok = Execute(command)
IF NOT ok THEN RETURN
There would, of course, be a few more complications than
this (you might, for example, have to have a way to let
the player know that you erased the plot), but nothing
that couldn't be sorted out in about half a day's work,
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/