Before the advent of digital computers, a lot of scientific publications had high quality illustrations. How did they do this without computers?
Examples of illustrations to which I am referring:
(from Timoshenko, S. (1940). Strength of materials. Part I & II.)
I am asking how illustrations was drawn in first place (by an artist), not how them was transferred to book paper (by a printer).
How did they do this without computers?
They used rulers. If you exclusively know how to draw with a computer: that's a straight edged object, to help guide a pen or pencil into a straight line.
For really advanced technical drawings, such as the curve graph example, there were templates with different curves (elliptic, parabolic, hyperbolic):
There were even templates for the distinct type of lettering (to draw by hand). There were also rub-off sheets, for lettering as well as for standard symbols:
(image from http://www.smithdrafting.com; see there for loads more of these)
(Although it appears to me no template was used in your examples, as they both are lettered good but not perfectly.)
The hand drawn images can be cut and pasted onto text pages to fit, after which the entire page was photographed and used as-is, or, alternatively, the images could be photographed separately from the text and composited as negatives, just prior to transferring them to an offset plate. The latter was the preferred way of handling these where I started out, because often the quality of the images was wildly different from the plain (typeset) text. That way we could ensure an optimal contrast for both images and text.