More & more correct info about getting the rank of nodes:
- sometimes the rank value changes between phases 1, 2 and 3.  So to get the final ranking, run 
dot -Gphase=3. - normally, 
dot -Gphase=3will add a rank attribute to the output, butdot -Gphase=4ordot -Gphase=""or plain olddot ...will NOT show the rank attribute - however, dot will keep any rank attribute it is given as input,  so you  can run this pipeline that saves the rank as a final attribute:  
dot -Gphase=3 myfile.gv | dot -Gphase="" >myfile.dot(note the phase=“” to reset the phase attribute set in the first dot invocation)