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