How can we mapped earthquake size in circle of different radius and color based on depth cpr

Mapping legend in earthquake visualization

Look at plot with option -Sc (symbol circle [3rd column = size]) and -Ccolor.cpt (related to makecpt module)

gmt makecpt -T0/9 > color.cpt
gmt plot file.txt -Sc -Ccolor.cpt

text.txt = lon | lat | depth(radius)

This will give same size circle of different colour depending on depth
I need different size circle for different magnitude having colour based on depth
Also need to show these in colour bar and legends
Someone plz suggest me.

See example 22 for plotting circles of varying sizes an colors based on extra data columns.