Yes, it’s an analogy. The line is analogous to reality, the ruler is analogous to a map of reality. The ruler is not the line, it can only map certain points on it.
Discussion
And I'm suggesting the analogy is bad. A line is continuous. Reality may not be, and in fact there is evidence that it is not.