plot likelihood function in r