Analogy Vs. Metaphor - Know the Difference and Be Wise!

Difference between analogy and metaphor
A metaphor involves the figurative use of words rather than their literal use. It equates two different things, while stating one to be the other, whereas an analogy is the comparison of the relationship between two objects, people, or situations, for clarifying a concept. This Buzzle post explains the difference between an analogy and a metaphor.
Joy is to fun what the deep sea is to a puddle. It's a feeling inside that can hardly be contained.
Terry Pratchett, A Hat Full of Sky
Analogies, as well as metaphors are literary devices. The former can be referred to as a logical argument. It involves making a comparison between two different things (events, ideas, people, etc.) for drawing an inference. The comparison reveals the similarity between these different things, which in turn explains the relationship between these things. Such comparative or parallel cases can certainly help one deduce logic. The aforementioned quote is a good example of an analogy, as it helps convey the overwhelming nature of joy and its magnitude. A metaphor equates one thing to something that is completely unrelated. It is an implicit comparison that can help the reader or listener draw out the intended meaning.

An analogy is more complicated or elaborate than a metaphor or a simile. In case of an analogy, comparisons are made to demonstrate the similarities between two things, so as to help interpret the subject.
Difference Between an Analogy and a Metaphor
Unlike a simile that directly compares two things by using the words 'like' or 'as', a metaphor equates two completely different things. A metaphor is a word/phrase that is applied to an object or concept to which it is not literally applicable, which is why it is called a figure of speech. It is a literary device that shouldn't be taken literally.

It must be noted that metaphors may not always be in the form where one thing is equated to the other. At times, a metaphor might be in the form of an adjective that modifies a noun. For instance, the phrases 'piercing gaze' or 'icy stare' are metaphors, as gaze and stare cannot be piercing or icy literally.

One of the major differences between an analogy and metaphor is that the former is more complex than the latter. An analogy is like a logical argument wherein the similarity between two different things, situations, or ideas helps clarify the subject. A literary device used for establishing a relationship based on the shared characteristic/connection/resemblance between two situations, people, or objects, an analogy helps in clarifying a new subject with the help of a familiar subject. Thus, in case of an analogy, the comparison helps one to draw an inference.
Examples of Metaphors
In case of metaphors, an implicit comparison is made, which draws attention to what the two different ideas or things might have in common. Such implicit comparisons can help in conveying the meaning. For instance, when one calls a person an early bird, it is an implicit comparison that conveys that the person gets up early. Here are some examples of metaphors:

He has the strength of an elephant.

She has the voice of a crow.

He is the light of my life.

She is feeling blue.

He is a pig when he eats.

She has a heart of gold.

America is a melting pot.

He is a bad apple.

She is the apple of my eyes.

Her eyes were balls of fire, looking for the miscreants.

He reeks of jealousy.

It's raining men.
Funny Examples of Metaphors
Happiness is having a large, loving, caring, close-knit family in another city.
George Burns

If you cannot get rid of the family skeleton, you may as well make it dance.
George Bernard Shaw

True friends stab you in the front.
Oscar Wilde

A happy family is but an earlier heaven.
George Bernard Shaw
Examples of Analogies
Here are a few examples to explain the concept of an analogy:

Day is to humans as night is to owls.

What strings are to a guitar, love is to life.

Obeying is to a servant, like ordering is to a master.

Ground is to a snake as sky is to an eagle.

Just as the earth revolves around the sun, an electron revolves around the nucleus.

Just as a caterpillar grows out of its cocoon, so we must grow out of our comfort zone.

Pen is to author as brush is to painter.

Author is to story as poet is to poetry.

Man is to men as goose is to geese.

Cat is to mouse as spider is to fly.

Knife is to cut as pen is to write.

Bird is to fly as fish is to swim.

What a cobra is to a mongoose, a cat is to a dog.

The captain is to his ship as the leader is to his tribe.

A fish is to swimming as a bird is to flying.

Gold is to a goldsmith as iron is to a blacksmith.

Time is to a watch as light is to the sun.

What a note is to a singer, a word is to a writer.

Comedy is to tears as suspense is to boredom.
Long-bottom, if brains were gold, you'd be poorer than Weasley, and that's saying something.
J.K. Rowling, Harry Potter and the Sorcerer's Stone
On a concluding note, a metaphor equates two things or concepts to convey the meaning, whereas, an analogy helps in clarifying a subject by making a comparison between two different subjects. An analogy involves a comparison with a familiar subject to explain an unfamiliar subject.