Two RPMs need to be installed before anything else
# yum install rpmorphan graphviz
Now, assume you need all the deps for rebuilding "rpm" (The actual RPM rpm)
First, generate a textual dep graph using:
# rpmdep -dot rpm.dot rpm
The "dot" is a file-format which will be used by the "dot" program to plot a graph. To plot the graph
# dot -Tsvg rpm.dot -o rpm.svg
The command takes rpm.dot and plots the graph in an svg format.
Simple!!
A sample image I generated is here: