Implementation of graph command.