is y=4 a function

It depends on what definition of a function you are using, but to me, it is just a value. It needs a second unknown that will vary with changes in the first.

y = 4x is a function.

Of course, y = 4 can be graphed. It will give you a horizontal line, since it will be the same for all values of x.

I hope this helps. Thanks for asking.