comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Anything in IDL like R's Copy to Clipboard As a Metafile?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Anything in IDL like R's Copy to Clipboard As a Metafile? [message #48199] Thu, 06 April 2006 15:13
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
Earl F. Glynn wrote:
> I'm new to IDL and I'm looking for functionality that works well in R.
>
> With any R graphic, I can click on "File" and select Copy to Clipboard and
> then select "As a Metafile" or "As a Bitmap". Usually the Metafiles work
> great when pasted into Word documents.

The "File" menu? Surely it should be in the Edit menu :)
>
> Did I miss something in the IDL documentation about a quick and easy way to
> get IDL graphics into Word (of course, Alt-PrintScreen does work, but it's a
> bit crude). The only solution I see now is to create a graphic file and
> then import it back into Word, which will be quite tedious compared with
> what R provides.

The basic facilities to do this are in IDL, but to access them you need
a "smart plotting window" application.

The iTools will do this. Eg, type "iplot, indgen(11)" and then select
the "Edit/Copy" menu item, but *first* go to "File/Properties/General
Settings" and change "Clipboard output format" from "Bitmap" to "Metafile".

There are smart plotting window objects in my Motley library, still
hosted by David at

http://www.dfanning.com/hadfield/idl/README.html

(though he keeps threatening to pull the plug and become a tennis bum).

Try mgh_example_plot, which creates an object-graphics plot in an
mgh_window object, or one of its subclasses. Select "Edit/Copy/Vector".

Or try "mgh_example_dgwindow", which creates a direct-graphics plot in
an mgh_dgwindow object. This supports only bitmap ouput to the clipboard
at the moment, via the "Edit/Copy" menu item, but I think facilities now
exist in IDL to support direct-graphics vector output to the clipboard.

--
Mark Hadfield "Kei puwaha te tai nei, Hoea tahi tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: Anything in IDL like R's Copy to Clipboard As a Metafile? [message #48211 is a reply to message #48199] Thu, 06 April 2006 13:09 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Earl F. Glynn writes:

> I'm new to IDL and I'm looking for functionality that works well in R.
>
> With any R graphic, I can click on "File" and select Copy to Clipboard and
> then select "As a Metafile" or "As a Bitmap". Usually the Metafiles work
> great when pasted into Word documents.
>
> Did I miss something in the IDL documentation about a quick and easy way to
> get IDL graphics into Word (of course, Alt-PrintScreen does work, but it's a
> bit crude). The only solution I see now is to create a graphic file and
> then import it back into Word, which will be quite tedious compared with
> what R provides.

This can be done crudely with the (very) old program, Clipboard,
described in this article:

http://www.dfanning.com/tips/clipboard.html

I see there are new keywords now for the clipboard object
DRAW method that will allow enhanced metafile output.
Such a thing could easily be added to the program, although
the fundamental restriction is that the "thing" being drawn
is a screen dump of the graphics window, as an image. So you
have all the normal resolution issues with that.

Absent the new keywords you might choose to add, I believe
the image is put into Windows applications as a bitmap.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: populating an array
Next Topic: Re: Curvefit issues

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 23:13:51 PDT 2025

Total time taken to generate the page: 0.56158 seconds