add support for negative y-values to graph constructor