# Can't plot 3d graph

**URL:** <https://forum.generic-mapping-tools.org/t/cant-plot-3d-graph/194>\
**Category:** Q&A\
**Created:** [January 14, 2020, 10:14am UTC](https://forum.generic-mapping-tools.org/t/cant-plot-3d-graph/194 "2020-01-14T10:14:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kota](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/kota/32/110_2.png) [@Kota](https://forum.generic-mapping-tools.org/u/Kota)\
**Post date:** [January 14, 2020, 10:14am UTC](https://forum.generic-mapping-tools.org/t/cant-plot-3d-graph/194/1 "2020-01-14T10:14:25Z")

</div>

(I’m sorry my English is bad.)

Dear All.

I attempted plotting 3d-graph to show error-value about some analysis.  
I wrote this code, but can’t plot graph (the output figure is only 1 black line).

* * *

```
gmt psbasemap -JX12/12 -JZ12 -R6.5/9.0/2.0/4.5/0.003/0.004 -Bagf -BWSNEZ -p220/20/0 -X2 -Y3 -K > output.ps
gmt psxyz -JX -JZ -R -Sc0.3c -Gred -p220/20/0 << END -O >> output.ps
8.1000004 4.5000000 0.0033251 
8.1999998 3.2000000 0.0033287 
7.8000002 4.3000000 0.0033349 
8.0000000 3.7000000 0.0033394 
END

```

* * *

I know this problem may be caused by using very small z-values, so could you teach me how I should modify this script?

Any help would be highly appreciated.  
Thanks.

Kota

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [January 14, 2020, 6:04pm UTC](https://forum.generic-mapping-tools.org/t/cant-plot-3d-graph/194/2 "2020-01-14T18:04:09Z")

</div>

No surprise they all fall in a same level. z in your points only differs slightly in the 5th decimal place.

---

<div class="post-metadata">

**Author:** ![Kota](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/kota/32/110_2.png) [@Kota](https://forum.generic-mapping-tools.org/u/Kota)\
**Post date:** [January 15, 2020, 6:50am UTC](https://forum.generic-mapping-tools.org/t/cant-plot-3d-graph/194/3 "2020-01-15T06:50:09Z")

</div>

I appreciate your response!

Is there a way to plot xy-level with keeping z-values? or should I use Microsoft Excel?

Thanks.

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [January 15, 2020, 3:41pm UTC](https://forum.generic-mapping-tools.org/t/cant-plot-3d-graph/194/4 "2020-01-15T15:41:01Z")

</div>

But that’s what you did no? Maybe the symbol size was too big. Or am I missing the issue?

---

<div class="post-metadata">

**Author:** ![Kota](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/kota/32/110_2.png) [@Kota](https://forum.generic-mapping-tools.org/u/Kota)\
**Post date:** [January 17, 2020, 7:53am UTC](https://forum.generic-mapping-tools.org/t/cant-plot-3d-graph/194/5 "2020-01-17T07:53:42Z")

</div>

I appreciate your reply  
In actuality, there are more data I want to plot. (The data is at the bottom)

I can plot the figure by Excel.

 ![image](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/1X/05948f85e8ed58e51bcd09b2b99910e7a077cc31.png)

But, GMT can’t plot x&y axis, like this. (I don’t need lines between the point such as Excel figure)

 ![output](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/1X/d77fd4d4b50f94903022b64c1822d3d3993d232f.png)  
  
  
Is it caused by using very small z-values? or I wrote wrong scripts?  
  

— The Data —

| X-value | Y-value | Z-value |
| --- | --- | --- |
| 6.5000000 | 3.3000000 | 0.0033689 |
| 6.5000000 | 3.4000001 | 0.0033681 |
| 6.5000000 | 3.5000000 | 0.0033666 |
| 6.5000000 | 3.5999999 | 0.0033655 |
| 6.5000000 | 3.7000001 | 0.0033642 |
| 6.5000000 | 3.8000000 | 0.0033621 |
| 6.5000000 | 3.9000001 | 0.0033596 |
| 6.5000000 | 4.0000000 | 0.0033573 |
| 6.5999999 | 3.3000000 | 0.0033690 |
| 6.5999999 | 3.4000001 | 0.0033682 |
| 6.5999999 | 3.5000000 | 0.0033666 |
| 6.5999999 | 3.5999999 | 0.0033656 |
| 6.5999999 | 3.7000001 | 0.0033644 |
| 6.5999999 | 3.8000000 | 0.0033625 |
| 6.5999999 | 3.9000001 | 0.0033599 |
| 6.5999999 | 4.0000000 | 0.0033574 |
| 6.5999999 | 4.0999999 | 0.0033563 |
| 6.6999998 | 3.4000001 | 0.0033684 |
| 6.6999998 | 3.5000000 | 0.0033666 |
| 6.6999998 | 3.5999999 | 0.0033658 |
| 6.6999998 | 3.7000001 | 0.0033648 |
| 6.6999998 | 3.8000000 | 0.0033628 |
| 6.6999998 | 3.9000001 | 0.0033603 |
| 6.6999998 | 4.0000000 | 0.0033581 |
| 6.6999998 | 4.0999999 | 0.0033562 |
| 6.8000002 | 3.4000001 | 0.0033680 |
| 6.8000002 | 3.5000000 | 0.0033667 |
| 6.8000002 | 3.5999999 | 0.0033658 |
| 6.8000002 | 3.7000001 | 0.0033646 |
| 6.8000002 | 3.8000000 | 0.0033630 |
| 6.8000002 | 3.9000001 | 0.0033605 |
| 6.8000002 | 4.0000000 | 0.0033579 |
| 6.8000002 | 4.0999999 | 0.0033560 |
| 6.8000002 | 4.1999998 | 0.0033681 |
| 6.9000001 | 3.5000000 | 0.0033669 |
| 6.9000001 | 3.5999999 | 0.0033659 |
| 6.9000001 | 3.7000001 | 0.0033648 |
| 6.9000001 | 3.8000000 | 0.0033630 |
| 6.9000001 | 3.9000001 | 0.0033612 |
| 6.9000001 | 4.0000000 | 0.0033587 |
| 6.9000001 | 4.0999999 | 0.0033558 |
| 6.9000001 | 4.1999998 | 0.0033662 |
| 6.9000001 | 4.3000002 | 0.0033709 |
| 7.0000000 | 3.5000000 | 0.0033773 |
| 7.0000000 | 3.5999999 | 0.0033758 |
| 7.0000000 | 3.7000001 | 0.0033745 |
| 7.0000000 | 3.8000000 | 0.0033726 |
| 7.0000000 | 3.9000001 | 0.0033700 |
| 7.0000000 | 4.0000000 | 0.0033667 |
| 7.0000000 | 4.0999999 | 0.0033650 |
| 7.0000000 | 4.1999998 | 0.0033749 |
| 7.0000000 | 4.3000002 | 0.0033760 |
| 7.0999999 | 3.5999999 | 0.0033759 |
| 7.0999999 | 3.7000001 | 0.0033744 |
| 7.0999999 | 3.8000000 | 0.0033731 |
| 7.0999999 | 3.9000001 | 0.0033703 |
| 7.0999999 | 4.0000000 | 0.0033671 |
| 7.0999999 | 4.0999999 | 0.0033645 |
| 7.0999999 | 4.1999998 | 0.0033726 |
| 7.0999999 | 4.3000002 | 0.0033721 |
| 7.0999999 | 4.4000001 | 0.0033769 |
| 7.1999998 | 3.5999999 | 0.0033750 |
| 7.1999998 | 3.7000001 | 0.0033744 |
| 7.1999998 | 3.8000000 | 0.0033726 |
| 7.1999998 | 3.9000001 | 0.0033700 |
| 7.1999998 | 4.0000000 | 0.0033667 |
| 7.1999998 | 4.0999999 | 0.0033730 |
| 7.1999998 | 4.1999998 | 0.0033674 |
| 7.1999998 | 4.3000002 | 0.0033658 |
| 7.1999998 | 4.4000001 | 0.0033689 |
| 7.1999998 | 4.5000000 | 0.0033679 |
| 7.3000002 | 3.7000001 | 0.0033739 |
| 7.3000002 | 3.8000000 | 0.0033725 |
| 7.3000002 | 3.9000001 | 0.0033698 |
| 7.3000002 | 4.0000000 | 0.0033681 |
| 7.3000002 | 4.0999999 | 0.0033677 |
| 7.3000002 | 4.1999998 | 0.0033634 |
| 7.3000002 | 4.3000002 | 0.0033583 |
| 7.3000002 | 4.4000001 | 0.0033650 |
| 7.3000002 | 4.5000000 | 0.0033586 |
| 7.4000001 | 3.7000001 | 0.0033733 |
| 7.4000001 | 3.8000000 | 0.0033737 |
| 7.4000001 | 3.9000001 | 0.0033731 |
| 7.4000001 | 4.0000000 | 0.0033736 |
| 7.4000001 | 4.0999999 | 0.0033678 |
| 7.4000001 | 4.1999998 | 0.0033595 |
| 7.4000001 | 4.3000002 | 0.0033529 |
| 7.4000001 | 4.4000001 | 0.0033528 |
| 7.4000001 | 4.5000000 | 0.0033519 |
| 7.5000000 | 3.8000000 | 0.0033785 |
| 7.5000000 | 3.9000001 | 0.0033768 |
| 7.5000000 | 4.0000000 | 0.0033745 |
| 7.5000000 | 4.0999999 | 0.0033690 |
| 7.5000000 | 4.1999998 | 0.0033561 |
| 7.5000000 | 4.3000002 | 0.0033478 |
| 7.5000000 | 4.4000001 | 0.0033455 |
| 7.5000000 | 4.5000000 | 0.0081498 |
| 7.5999999 | 3.8000000 | 0.0033812 |
| 7.5999999 | 3.9000001 | 0.0033796 |
| 7.5999999 | 4.0000000 | 0.0033745 |
| 7.5999999 | 4.0999999 | 0.0033655 |
| 7.5999999 | 4.1999998 | 0.0033538 |
| 7.5999999 | 4.3000002 | 0.0033445 |
| 7.5999999 | 4.4000001 | 0.0033403 |
| 7.5999999 | 4.5000000 | 0.0033406 |
| 7.6999998 | 3.9000001 | 0.0033792 |
| 7.6999998 | 4.0000000 | 0.0033755 |
| 7.6999998 | 4.0999999 | 0.0033663 |
| 7.6999998 | 4.1999998 | 0.0033587 |
| 7.6999998 | 4.3000002 | 0.0033482 |
| 7.6999998 | 4.4000001 | 0.0033447 |
| 7.6999998 | 4.5000000 | 0.0033426 |
| 7.8000002 | 3.9000001 | 0.0033754 |
| 7.8000002 | 4.0000000 | 0.0033710 |
| 7.8000002 | 4.0999999 | 0.0033648 |
| 7.8000002 | 4.1999998 | 0.0033603 |
| 7.8000002 | 4.3000002 | 0.0033509 |
| 7.8000002 | 4.4000001 | 0.0033400 |
| 7.8000002 | 4.5000000 | 0.0033349 |
| 7.9000001 | 4.0000000 | 0.0033776 |
| 7.9000001 | 4.0999999 | 0.0033680 |
| 7.9000001 | 4.1999998 | 0.0033667 |
| 7.9000001 | 4.3000002 | 0.0033568 |
| 7.9000001 | 4.4000001 | 0.0033493 |
| 7.9000001 | 4.5000000 | 0.0073166 |
| 8.0000000 | 4.0000000 | 0.0033817 |
| 8.0000000 | 4.0999999 | 0.0033756 |
| 8.0000000 | 4.1999998 | 0.0033756 |
| 8.0000000 | 4.3000002 | 0.0033647 |
| 8.0000000 | 4.4000001 | 0.0033528 |
| 8.0000000 | 4.5000000 | 0.0033394 |
| 8.1000004 | 4.0999999 | 0.0033868 |
| 8.1000004 | 4.1999998 | 0.0033868 |
| 8.1000004 | 4.3000002 | 0.0033674 |
| 8.1000004 | 4.4000001 | 0.0033439 |
| 8.1000004 | 4.5000000 | 0.0033251 |
| 8.1999998 | 4.0999999 | 0.0034000 |
| 8.1999998 | 4.1999998 | 0.0033859 |
| 8.1999998 | 4.3000002 | 0.0033736 |
| 8.1999998 | 4.4000001 | 0.0033431 |
| 8.1999998 | 4.5000000 | 0.0033287 |
| 8.3000002 | 4.1999998 | 0.0033983 |
| 8.3000002 | 4.3000002 | 0.0033813 |
| 8.3000002 | 4.4000001 | 0.0033495 |
| 8.3000002 | 4.5000000 | 0.0033546 |
| 8.3999996 | 4.1999998 | 0.0070955 |
| 8.3999996 | 4.3000002 | 0.0033710 |
| 8.3999996 | 4.4000001 | 0.0033549 |
| 8.3999996 | 4.5000000 | 0.0033676 |
| 8.5000000 | 4.3000002 | 0.0034000 |
| 8.5000000 | 4.4000001 | 0.0033836 |
| 8.5000000 | 4.5000000 | 0.0033779 |
| 8.6000004 | 4.3000002 | 0.0034085 |
| 8.6000004 | 4.4000001 | 0.0033911 |
| 8.6000004 | 4.5000000 | 0.0070284 |
| 8.6999998 | 4.4000001 | 0.0036053 |
| 8.6999998 | 4.5000000 | 0.0033550 |
| 8.8000002 | 4.4000001 | 0.0033839 |
| 8.8000002 | 4.5000000 | 0.0033652 |
| 8.8999996 | 4.5000000 | 0.0033738 |
| 9.0000000 | 4.5000000 | 0.0033833 |
| — The Data — | | |

---

<div class="post-metadata">

**Author:** ![Joaquim](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/joaquim/32/16_2.png) [@Joaquim](https://forum.generic-mapping-tools.org/u/Joaquim)\
**Post date:** [January 17, 2020, 2:19pm UTC](https://forum.generic-mapping-tools.org/t/cant-plot-3d-graph/194/6 "2020-01-17T14:19:38Z")

</div>

```auto
psxyz pts3d.dat -R6.4/9.1/3.28/4.52/0.0033/0.0035 -JX12c/8c -Baf -Bza -BWSenZ -JZ5 -p200/30 -Su2p -P > ...

```

 ![GMTjl_tmp](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/1X/57c76d22d0b2b506d3db001ddf534f0a05b61655.png)

---

<div class="post-metadata">

**Author:** ![Kota](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/kota/32/110_2.png) [@Kota](https://forum.generic-mapping-tools.org/u/Kota)\
**Post date:** [January 19, 2020, 12:05pm UTC](https://forum.generic-mapping-tools.org/t/cant-plot-3d-graph/194/7 "2020-01-19T12:05:47Z")

</div>

I appreciate your response!  
I could do it with your script.

I really thank you for helping me.

Kota
