That just allows me to achieve the final effect I wanted in a fast way. By fast I mean without looping which is quite slow in my implementation.
Since I do not seem to have access to vertex shaders in my system (glGetString(GL_VERSION) returns 1.1.0), I am satisfied with that workaround. If there is a solution compatible with OpenGL 1.1 then I am eager to hear/read about it.
The beauty of glTexGenfv(GL_S, GL_OBJECT_PLANE, parameters) is that for plotting millions of vertexes I do not need to store millions of colors. In my application a 1D texture of 256 colors is enough for the case of visualizing f(x,y,z) = z
I am going to study vertex shaders to see if I can achieve a similar thing for the case f(x,y,z) = v