# Doubt about plotting seismicity in cross-section

**URL:** <https://forum.generic-mapping-tools.org/t/doubt-about-plotting-seismicity-in-cross-section/515>\
**Category:** Q&A\
**Created:** [June 3, 2020, 6:34am UTC](https://forum.generic-mapping-tools.org/t/doubt-about-plotting-seismicity-in-cross-section/515 "2020-06-03T06:34:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gery](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@gery](https://forum.generic-mapping-tools.org/u/gery)\
**Post date:** [June 3, 2020, 6:34am UTC](https://forum.generic-mapping-tools.org/t/doubt-about-plotting-seismicity-in-cross-section/515/1 "2020-06-03T06:34:32Z")

</div>

Dear gurus,

I did my cross-section to plot earthquakes using “project”, basically something like this (sorry about the variables, it is just an example that works using a color “gray” to fill in the symbols):

> awk ‘{ if ($4 \<= 50) print $3, $2, $4, $5\*.075 }’ FS=“,” $usgs | gmtselect $Fgmtselect $fgmtselect | project -C`cat tmp1 | tr ' ' '/'` -E`cat tmp2 | tr ' ' '/'` -Q -W-85/85 -V | awk ‘{ print $5, $3\*-1, $4 }’ | psxy -J -R -Sc -Ggray -W -O \>\> $ps

My doubt is about a figure I found here: [http://earthjay.com/earthquakes/20151126\_brazil/polet\_jascha\_seismicity\_peru\_cross\_section.jpg](http://earthjay.com/earthquakes/20151126_brazil/polet_jascha_seismicity_peru_cross_section.jpg)

This figure has a warm-to-cold color gradient to plot seismicity with depth (besides its size is based on magnitude). I am wondering if there is a way to use a single psxy call to create this behavior or should I use several psxy calls once seismicity is filtered out by depth (e.g., awk)?

Any support is welcomed,

Best regards,

Gery

---

<div class="post-metadata">

**Author:** ![pwessel](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/pwessel/32/30_2.png) [@pwessel](https://forum.generic-mapping-tools.org/u/pwessel)\
**Post date:** [June 3, 2020, 7:09am UTC](https://forum.generic-mapping-tools.org/t/doubt-about-plotting-seismicity-in-cross-section/515/2 "2020-06-03T07:09:54Z")

</div>

Add one more depth output column and use -Ccpt to look up colors from those depths.

---

<div class="post-metadata">

**Author:** ![gery](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@gery](https://forum.generic-mapping-tools.org/u/gery)\
**Post date:** [June 3, 2020, 3:44pm UTC](https://forum.generic-mapping-tools.org/t/doubt-about-plotting-seismicity-in-cross-section/515/3 "2020-06-03T15:44:52Z")

</div>

Simple like that, many thanks and sorry for the noise, I needed an extra cup of coffee to keep awake yesterday in this part of the world, I did not spot that.
