Fetching details from the dictionary...

to compare (something) to; to liken; to speak figuratively; to use a simile; to use a metaphor
人生を旅に例えることがよくある。
Life is often compared to a journey.
彼女の美しさを花に例えて褒めた。
I praised her beauty by comparing it to a flower.
難しいことを簡単なものに例えて説明した。
I explained difficult things by comparing them to simple ones.