View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

graphs

Guest wrote on Jan 20, 2006

hello!

i have a question on "exporting" graphs made with plot
tasks out of stsdas tasks (i.e. sgraph "SMA MAG" for
radial surface brightnes profile)... All graph or plot
tasks in iraf open in graphical terminal (i use DS9
and newest versions of iraf and stsdas), i.e. when
runing "imexamine" S - u get surface plot - graf in a
window (on x11 i think) which u cannot export or
copy-paste & do anything with it. So i would like to
know how do you get, export or save (in usefull
formats...) graphs in a way you can put them in
reports?

Thanxs, alex

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Post generated using Mail2Forum (http://www.mail2forum.com)

Mike Fitzpatrick wrote on Jan 20, 2006

See the FAQ and/or search the forums for similar questions and answers, but quickly: Tasks like SGRAPH usually have a 'device' parameter that let's you
specify a printer or something like the 'eps' or 'psdump' device to generate a PS file of the plot. A 'g-gif' device also exists to create a GIF of the plot instead of the terminal output.

From the cursor mode you can issue the command ":.snap lpr" to
send postscript to the default printer for the machine, or to the device
named by your unix PRINTER environment variable. With no device name
given it will go to whichever device is named by your 'stdplot'
environment variable, this may already be 'lp' or 'lpr' (these are
equivalent) and a shortcut command for this is to simply hist the '='
key. Once the plot is generated you may need to issue a ":.gflush"
command to flush the graphics buffer right away. To save the output to a
file for later use try the 'psdump' device to create a file in /tmp call
'irafdmpXXXX.ps' where the XXX is a process id, if you want EPS use the
'eps' device name and it will be saved to the current directory as
'sgiXXX.eps'.

IMEXAM has two cursor modes, if you want to save a graphics plot be sure to type 'g' to get into graphics mode (or 'i' to get back to image mode) so you can make a snap of a surface plot. Most of the functions have an equivalent task elsewhere in the system that can use the device param, e.g. to make plots in batch mode from a script. For tasks like SURFACE that doesn't have a cursor mode, an '=gcur' at the cl prompt will bring one up. Hope this helps.

-Mike

Last post on Jan 20, 2006