Plot 2D profile using file having xyz and diffusion

I am a beginner in GMT and this is my first question so I’m sorry if it is simple question.

I have a text file which have diffusion value at each xyz point aront.txt (31.8 KB) . My question is that if xyz are evenly distributed then can we get 2D plot at any depth using xyz2grd or surface (what i learned from GMT tutorial).

when I look at xyz2grd, It seems like there is no need to input of 4 columns. Just confused to get 2D slices at depth by user defined.

Your comments or suggestion will be helpful.



to get 2D slices at depth by user defined.

right now you have all the slices in one file. I believe GMT don’t have a means of choosing a slice. You can do it manually before gridding and plotting. An example extracting a slice at depth = -0.2 using awk (assuming columns 1,2,3 are x,y,z and column 4 is your diffusion value):
cat aront.txt | awk '{if ($3 == -0.2) print $1, $2, $4}' > aront_depth_-0.2.txt

then run xyz2grd and surface on each slice.

1 Like

This is correct. However, you are the 2nd person in a week with this need so I will see if I can get xyz2grd to produce a 3-D cube as well. But for now, follow the advice above.

1 Like

Thank you so much

Thank you so much. I will do it . Honestly, these depths are so random to publish in article so i was thinking to have a integer depth e.g 1,2,3 etc from 3Dgrid

How was that aront.txt file created? Looking at it we can see that it’s layout is the equivalent of what in images we call pixel-interleaved. one vertical column starting at first column, first row and then moving down the column. This means the equivalent of line and band interleaved can also exist. Plus the scanline or column major orientations and if it’s written top-down or bottom-up. Ufa, quite a lot of possibilities.

txt file was generated after the inversion process. The file layout is based on the grid size (10108). In this file, each value is calculated at each grid cell.

??? which?

I was trying to figure out if there is some common practice in these text cube layouts.

It will be bit long answer. I will try to explain, what I’m doing now:
I used the MuRAT package to calculate the attenuation in the Induced seismicity region. It provides the 3D output in the form of txt and vtk file. I want to plot in GMT so we can further understand the change in attenuation with respect to local geology.

I understand that. What I’m trying to tell you is that if we are going to add the ability to read cubes in text files we cannot do that only for your particular case. It must be a generic solution and that’s why I’m trying to figure out how general this particular layout is.