Utility functions for common tasks in photonics graphing