Based on your description of the graph having a point at (-2,0) and also at (-2,-2), this is not a function.
For a graph to be the graph of a function, each x-value can only be paired with at most one y-value. In other words, you cannot have two points with the same x-value.