# Psxy, color bar, azimuth

**URL:** <https://forum.generic-mapping-tools.org/t/psxy-color-bar-azimuth/1454>\
**Category:** Q&A\
**Created:** [March 10, 2021, 1:27am UTC](https://forum.generic-mapping-tools.org/t/psxy-color-bar-azimuth/1454 "2021-03-10T01:27:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wbm06](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@wbm06](https://forum.generic-mapping-tools.org/u/wbm06)\
**Post date:** [March 10, 2021, 1:27am UTC](https://forum.generic-mapping-tools.org/t/psxy-color-bar-azimuth/1454/1 "2021-03-10T01:27:08Z")

</div>

I am working on shear wave splitting analysis. I want to plot my results with a constant length bar and use a color palette to show the amplitude.

I wonder how can I replace the standard

> gmt psxy data -R -JM6i -Sv0.2i+jc -W2p,blue if I have an input file like  
> Longitude Latitude Azimuth Amplitude  
> -100 45 50 0.75

Cheers

---

<div class="post-metadata">

**Author:** ![maxrjones](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/maxrjones/32/2698_2.png) [@maxrjones](https://forum.generic-mapping-tools.org/u/maxrjones)\
**Post date:** [March 10, 2021, 2:05am UTC](https://forum.generic-mapping-tools.org/t/psxy-color-bar-azimuth/1454/2 "2021-03-10T02:05:13Z")

</div>

You can use the [-i option](https://docs.generic-mapping-tools.org/dev/cookbook/options.html#option-i) to specify which input columns to use and in what order.

---

<div class="post-metadata">

**Author:** ![wbm06](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@wbm06](https://forum.generic-mapping-tools.org/u/wbm06)\
**Post date:** [March 13, 2021, 2:46pm UTC](https://forum.generic-mapping-tools.org/t/psxy-color-bar-azimuth/1454/3 "2021-03-13T14:46:09Z")

</div>

Thanks but I am not sure how it works and how can I get a figure like below

> gmt psxy data -R -JM6i -Sv0.2i+jc -W2p -Camp.cpt

data:  
Longitude Latitude Azimuth Amplitude  
-100 45 50 0.75

 ![fig1](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/2X/1/1b685eaa285dbbba8f0b736f04957d13d17c3f16.jpeg)

Cheers

---

<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:** [March 13, 2021, 7:20pm UTC](https://forum.generic-mapping-tools.org/t/psxy-color-bar-azimuth/1454/4 "2021-03-13T19:20:50Z")

</div>

Example: Adding -i0:2,3+s0.1 will scale your amplitudes by a factor of 0.1 and then use the resulting value as the vector length in cm. E.g., the 0.75 will become 0.075 cm. You will need to figure out a good scale based on all our amplitudes, of course.
