How to compute the maximum likelihood hypothesis?
We can define a function $f(D,h) =P(D|h)$, that is it is a function of both $h$ and $D$ and we want to maximize it. 

In the event that $D$ is already fixed to be $\hat{D}$, then the goal should be to maximize the function $$g(h) = f(\hat{D}, h) = P(\hat{D}|h).$$ 

We can plot the function $g$, here $g$ is a function of $h$ rather than $D$.