completed tokeshi plot function