Working on some functions for graphs, don't know if these should be put into plugins or just stay in the graph class...