# Meaning of fMaximum and fMinimum for TGraph

Hello,
in the doc of TGraph, one reads

[quote]Double_t fMaximum Maximum value for plotting along y
Double_t fMinimum Minimum value for plotting along y[/quote]

How I understand that is that fMaximum contain the highest value among all the points of the TGraph
For example, if I do

```float x = {0,1,2}; float y = {10, 20, 30}; TGraph *g = new TGraph (3,x,y); cout << g->GetMaximum() <<endl;```
I expect to get 30
However, I get -1111 as for GetMinimum().
Am I misunderstood the doc or is there a bug?
In the first case, is there a way to get automatically the highest/lowest value of a set of points in a TGraph?

Thank you in advance.

This are the min and max value you set using SetMinimum and SetMaximum (from the underlying histogram defining the frame). -111 means they have not been set.
To get the Min and Max it is enough to get the min and max of the vectors in the graph (GetX(), GetY())

Thank you for the answer. I was confused with the mix between TGraph and TH1 (or TFrame).