An example of an analogy in the writing of a scientist:
"This method of viewing the heavens seems to throw them into a new kind of light. They now are seen to resemble a luxuriant garden, which contains the greatest variety of productions, in different flourishing beds; and one advantage we may at least reap from it is, that we can, as it were, extend the range of our experience to an immense duration. For, to continue the simile I have borrowed from the vegetable kingdom, is it not almost the same thing, whether we live successively to witness the germination, blooming, foliage, fecundity, fading, withering, and corruption of a plant, or whether a vast number of specimens, selected from every stage through which the plant passes in the course of its existence, be brought at once to our view?"
William Herschel
Herschel, W. (1789). XX. Catalogue of a second thousand of new nebulæ and clusters of stars; with a few introductory remarks on the construction of the heavens. Philosophical Transactions of the Royal Society of London, 79, 212-255. https://doi.org/doi:10.1098/rstl.1789.0021
A similar analogy was used by the Astronomer Royal over two centuries later: life cycles of stars can be inferred like the life cycles of trees.
Read examples of scientific analogies