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 University Press.
This quote include both negative and positive metaphors – Isaac Newton was not an actuary, but he was a detective.
Read about metaphor in science
Read about examples of science metaphors
Many examples of science metaphors are listed in 'Creative comparisons: Making science familiar through language. An illustrative catalogue of figurative comparisons and analogies for science concepts'. Free Download.
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
Many examples of science analogies are listed in 'Creative comparisons: Making science familiar through language. An illustrative catalogue of figurative comparisons and analogies for science concepts'. Free Download.