An example of an analogy that was used in science:
"One used to speak about the fluidity, rigidity, various elastic properties, and even the internal friction of light ether. Thus, for example, the fact [sic] that light ether behaves on the one hand as a vibrating solid when carrying light waves, but on the other hand shows a perfect fluidity and a complete absence of any resistance to the motion of celestial bodies, was interpreted by comparing it with such materials as sealing wax. Sealing wax and other similar substances, are, in fact, known to be quite hard and brittle in respect to forces acting rapidly in a mechanical impact, but will flow like honey under the force of their own weight if left alone for a sufficiently long time. Following the analogy, the old physics assumed that light ether, filling all interstellar space, acted as a hard solid in respect to very rapid distortions connected with the propagation of light, but behaved as a good liquid when the planets and stars, moving many thousand times slower than light, were pushing their way through it."
George Gamow (1961) One, Two, Three…Infinity. Facts and speculations of science, Revised Edition, Dover Publications, Inc., New York.
Here an analogy is used in comparing the properties of a conjectured and known materials. There is also a simile, in comparing sealing wax to honey.
Read examples of scientific analogies
Read about examples of science similes
Despite the detailed discussion here of the properties of the ether, which was once a serious preoccupation of some scientists, it is now considered a fictitious substance.