as-500/hw21/plots.R

23 lines
997 B
R
Raw Permalink Normal View History

pdf("fe_ion.pdf")
fe = read.table("shock.fe",header=T)
plot(seq(2,28),fe[1,c(seq(2,28))],type="b",xlab="Ionization Stage",ylab="Ionization Fraction",xaxp=c(0,0,1))
title("Ionization Fraction for Fe Stages, AGN Shock Winds (v=10,000 km/s)")
axis(1,at=2,label="Fe")
for(coord in seq(4,28,2)){axis(1,at=coord,label=parse(text=paste0("Fe","^+",coord-2)))}
dev.off()
pdf("oxy_ion.pdf")
oxy= read.table("shock.oxy",header=T)
plot(seq(2,10),oxy[1,c(seq(2,10))],type="b",xlab="Ionization Stage",ylab="Ionization Fraction",xaxp=c(0,0,1))
title("Ionization Fraction for O Stages, AGN Shock Winds (v=10,000 km/s)")
axis(1,at=2,label="O")
for(coord in seq(4,10,2)){axis(1,at=coord,label=parse(text=paste0("O","^+",coord-2)))}
dev.off()
pdf("cont.pdf")
cont = read.table("cont.preplot",fill=T)
plot(cont[,1],cont[,2],type="l",log="x",xlim=c(1e-5,1e4),xlab="Wavelength (microns)",ylab=parse(text=paste("Flux","(ergs/cm^2/s)")))
title("Emitted Continuum, AGN Shock Winds (v=10,000 km/s, T=2e9 K) ")
dev.off()