initial plot function