# Plotting 3D slip distrbution figure

**URL:** <https://forum.generic-mapping-tools.org/t/plotting-3d-slip-distrbution-figure/4394>\
**Category:** Q&A\
**Tags:** gmt, cpt\
**Created:** [November 1, 2023, 3:17pm UTC](https://forum.generic-mapping-tools.org/t/plotting-3d-slip-distrbution-figure/4394 "2023-11-01T15:17:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohamed\_Xidian](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@Mohamed\_Xidian](https://forum.generic-mapping-tools.org/u/Mohamed_Xidian)\
**Post date:** [November 1, 2023, 3:17pm UTC](https://forum.generic-mapping-tools.org/t/plotting-3d-slip-distrbution-figure/4394/1 "2023-11-01T15:17:59Z")

</div>

Hi,  
I am trying to create a 3D plot of slip distribution along a fault surface using GMT 6.4 on a Fedora 38 system. I have used the following command lines on my terminal to generate the plot:

$ gmt psxyz menyuan\_fault\_str.xyzs -R683100/714050/4177300/4186750/-30000/0 -Jx0.0004 -Jz0.0004 -E30/25 -m -L -Cpal.str -W0.5 -B10000/10000/10000 -K \> slip.ps  
$ gmt psscale -D2/0.1/6/0.3h -Cpal.str -O -B2:slip"(m)" \> slip.ps

However, the output is an empty plot without any color!!!  
[str-slip.ps](https://forum.generic-mapping-tools.org/uploads/short-url/hrCxhjD1Bo3jz16pLEKNibWp7QZ.ps) (47.7 KB)

I have verified that the data file `menyuan_fault_str.xyzs` and the color palette file `pal.str` are in the correct format and are located in the current working directory. The fourth coulmn in “menyuan\_fault\_str.xyzs” represent the slip value.  
[GMT\_comitty.zip](https://forum.generic-mapping-tools.org/uploads/short-url/8D8rWiF4EgqSkCjtt9KhH0j4A0o.zip) (14.0 KB)

I am wondering if anyone could help me identify what might be going wrong. I will be appreciated if write the correct command lines.

---

<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:** [November 1, 2023, 3:44pm UTC](https://forum.generic-mapping-tools.org/t/plotting-3d-slip-distrbution-figure/4394/2 "2023-11-01T15:44:06Z")

</div>

Looks like you are running GMT 3 or 4 scripts? No **-E -m** in **psxyz** but I think we honour these obsolete settings (use **-p** instead of **-E** ).  
As for colouring lines, see **-W** _pen_ **+cl** etc. But you have a space after your **-Z** options in your data file segment headers so no z-value is found. Note that nowhere in GMT do we have a space between option and argument. You may consider **-Z**. Your lines are not symbols so you cannot teat them with **-C** as you do with circles etc.

BTW: GMT CPTs have _never ever_ been called \*.str so I doubt that is going to pay off for you.

---

<div class="post-metadata">

**Author:** ![Mohamed\_Xidian](https://avatars.discourse-cdn.com/v4/letter/m/2acd7d/32.png) [@Mohamed\_Xidian](https://forum.generic-mapping-tools.org/u/Mohamed_Xidian)\
**Post date:** [November 1, 2023, 3:53pm UTC](https://forum.generic-mapping-tools.org/t/plotting-3d-slip-distrbution-figure/4394/3 "2023-11-01T15:53:23Z")

</div>

> [@pwessel](#):
>
> GMT 3 or 4 scripts

Thanks for your reply and clarification, but I need to make a color for patches, not lines. I need to make a figure such as this attached figure! [slip\_distribution.PNG|638x456](https://forum.generic-mapping-tools.org/uploads/short-url/jSTURfsvcFKoxsFnULCIICmeoBD.jpeg)

---

<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:** [November 1, 2023, 4:15pm UTC](https://forum.generic-mapping-tools.org/t/plotting-3d-slip-distrbution-figure/4394/4 "2023-11-01T16:15:53Z")

</div>

Well, still need to see **-W** and using modifier **+cf.** no?
