SOAR-High
Earth System Science
A Clerc Center Web-Based Collaboration
Gallaudet University, Washington, D.C. 

 

To our Visitors
Do you use
SOAR-High
materials?
Tell us!
Home
About
Site Map
  Go to Class
Unit:
1  2  3  R.I
4  5  6  R.II
Portfolios
Pictures
Class
Discussion
Rules & Guides
  Resources
  G.L.O.B.E.
Science
Web Links
Tool Room
Deaf Scientists
Historical
Timelines
Calendar
Teacher Notes
IDL Plot Program

Cut and paste the following program to produce graphs for WWW pages:

PRO plotxy
;----------------------------------------------
;               Insert data
;----------------------------------------------
y = [1,2,3,4,5,6,7]
x = [1,2,3,4,5,6,7]
;----------------------------------------------
;               Set Plot Titles
;----------------------------------------------
xt='Type the X-Axis Label Here'
yt='Type the Y-Axis label Here'
ti='Type a Plot Title Here'
;----------------------------------------------
;               Set GIF Image Filename
;----------------------------------------------
fgif = 'A:\data.gif'
;----------------------------------------------
;               Set Windows and Colors
;----------------------------------------------
loadct, 39
!p.color = 0
!p.background=255
erase, 255
window, xsize=256, ysize=256
plot,x,y,xtitle=xt,ytitle=yt,title=ti,color=0,psym=7,symsize=2.0
;-----------------------------------------------
;              Find a Best Fit Line
;-----------------------------------------------
c = POLY_FIT(x,y,1)
yfit = c(0) + c(1)*x
oplot, x, yfit, color=60
sslope = 'Slope = '+STRING(c(1))
xyouts,0.5,0.01,sslope,align=0.5,COLOR=60,/NORMAL
;-----------------------------------------------
;         Write a GIF Image of Plot
;-----------------------------------------------
img = TvRd()
tvlct, r, g, b, /get
Write_GIF,fgif,img,r,g,b
END


These web pages and some supporting images were generated with IDL.

Copyright © 1999 Gallaudet University
Laurent Clerc National Deaf Education Center
All Rights Reserved
Mon Jan 6 05:23:32 2003