ego network plot function