Convert map from 2D to 3D

MODL.phi.txt (632.1 KB) test.txt (753 Bytes) cpt.txt (32.9 KB) hello everyone
greetings of the day
I have made a map in 2D that i want to convert into a 3D map with z varying in depth from 0 to 25 using psxyz. i have a MODL.phi1 grid or xyz (attached) file that have longitude, latitude, depth, and a value of phi for each grid. In 2D I am getting a file dauki.jpg(attached) . I want to convert it into 3D.Kindly suggest to me where i have to change the command. I will be very thankful to you

Hi @rajkumar31894!! Welcome to the GMT forum.

Could you share your script?

test.txt (753 Bytes)

yes sir please find the attached file.

Sorry, I didn’t realize that that was the script. I copy it below.

#!/bin/csh -f
set MAP_FRAME_TYPE = FANCY
set MAP_FRAME_AXES = WeSn
set psfile=dauki.ps
set range="89/94/24/26.5"
set projection="m2.0"
set ticks="a1"
psbasemap -R${range} -J${projection} -B${ticks} -X2 -Y2 -V -K > ${psfile}
psxy MODL.phi1 -R${range} -J${projection} -Cphi.cpt -L -O -V -K >> ${psfile}
psscale -Cphi.cpt -Dx12.5c/6.0c+w6c/0.8c+jTC -P -Bxaf -By+l"phi" -R${range} -J${projection} -K -V -O >> ${psfile}
evince ${psfile}

%i want to convert into 3D map with z varies in depth from 0 to 25 using psxyz. i have a file MODL.phi1 grid file which have longitude latitute depth and a value phi for each grid. In 2D i am getting like dauki.ps file. I want to convert it into 3D.Sir please suggest me where i have to change the command.

I think you to start creating a grid from your data. You could try with surface.


sir my data format is different (attached screenshot). Here we have for every four points there is a phi value which is plotted here. I just want it into 3D picture like (attached) I used the surface command then these phi value vanishes.

I’m affraid I don’t know how to do that figure. I would like to.

Looks like you have patches of polygons taht should have color specified by the -Z settings in the headers. So clearly plot3d is needed with -G and -C. However, you would be required to ensure that the order of the polygons are such that the ones further back do not overprint the ones up front. It mak be a messy job.

This zoom makes me think that the curtains might have been made with a series of vertical images. There is even a stray one in the middle.

image

The way I would try to do that would involve some labor and the use of the GMT.jl pcolor function

This (complicated) script also comes to my mind.