documenting plot function