Department of
Physics & Astronomy


Main Page
  • Computer System
    • IDL Tutorial

IDL Tutorial

(What Is IDL? |A Simple Plot |A Surface Plot )

Useful Links

How to start IDL

On the P&A system, IDL must be run from quark. If you are in the P&A Computer room (TH 323), you are probably running on one of the Linux stations. Open an xterm window and connect to quark using ssh. Here is how this should look:
	th123-22:bland% ssh quark
	Last login: Thu Dec  6 18:10:55 2001 from

	            Welcome to Quark

	You have mail.
Try the following command:
	th123-22:bland% xclock &
A clock should come up on your screen. If this doesn't happen, you need to set your DISPLAY system variable. When the clock comes up, continue. Then start IDL:
	quark:bland% idl
	IDL Version 5.4 (sunos sparc). (c) 2000, Research Systems, Inc.
	Installation number: 656-1.
	Licensed for use by: SFSU Department of Physics &  Astronomy


You are probably logged onto stars.
So, you must rlogin onto hodge,
and then set the environmental variable DISPLAY to point to your computer.
Here is an example, with more details available:
	stars:drodman% rlogin hodge		# You are Dennis Rodman
(give your password)
	hodge:drodman% setenv DISPLAY
Note the capital letters for DISPLAY - Unix is case-sensitive. The name given is that of one of the computers in TH 123.

Simple Graphics

Here is the simplest graphics example possible. It is a good test that your terminal is set up right, before trying anything more intricate:
	hodge:drodman% idl
	IDL> plot,findgen(100)
The first line starts IDL; the second line should cause a graphics window to be opened, and a graph of a straight line should appear.

Now try a short tutorial example to draw a pretty plot with titles and colors.