An example of metaphor in writing about science and scientists:
"Newton was not an actuary who could squeeze a functional relationship out of columns of data; he was an inspired detective who, from a set of apparently disconnected events (a bark, a footprint, a faux pas, a stain) concluded 'The gamekeeper did it'."
Norwood Russell Hanson
Hanson, N. R. (1958). Patterns of Discovery: An inquiry into the conceptual foundations of science. Cambridge Univerity Press.
This quote include both negative and positive mtaphors – Isaac Newton was not an actuary, but he was a decective.
Although the metaphor is extended by locating it in a conceptual structure (what the detective used, what the detective concluded), I do not think it counts as an explicit analogy, as we are not told what the clues or the perpetrator map onto in Newton's scientific work.
Read examples of scientific analogies