manipulating one coordinate of vertices

I am learning OpenGL 2.0 from wikibooks: https://en.wikibooks.org/wiki/OpenGL_Programming

I am animating a 2D plot. The x-coordinates of all the vertices are set once. I have the y-coordinates stored in a std::vector. Redrawing every few hundred frames.
Would it be possible to update only the y-coordinate information in the vertex shader? The number of y-coordinates (size of vector) is a variable.
Another option is passing both the x and y coordinates, but keeping them in separate structures.

Yes. The vertex shader needs to set gl_Position for each vertex, but can do so however you wish. So you can have separate 1-component attributes for the X and Y coordinates.

If the X coordinates are equally spaced, there’s no need to supply the individual values. You can just supply the offset and spacing via uniforms and derive the values from gl_VertexID.

Thank you. What would the types of these attributes be? The most natural type for me would be vec1, but i can’t see such a thing.

The type would be float.