When I was in grad school in SF in 95-01 I lived on a $25K salary. I did this by sharing a place with several people, in the outermost part of SF. I had to spend about 1.5 hours on MUNI a day. It was pretty miserable but it was the only place I could afford.
Prices have appreciated, but if you're not trying to buy a house, and you're willing to compromise a lot, I think you can live in the city on a teacher salary ($60K/year).