Automatically creating graphs