2

I have collected data at eight different point along a profile of 5000km long. The data consist of velocity value at different depth. I am able to plot velocity vs depth with X axis as velocity and y axis downward as depth. But I want to plot x-axis as profile distance(0 to 5ooo) on x-axis and Depth on y-axis downward, with velocity vs depth at different distance along profile. say at 2000km distance on x-axis I want to plot velocity vs depth. so far what I did given below. But output is not what I want.

#!/usr/bin/gnuplot
set terminal png medium
set output "ave_psi.png"
unset key
reset
set term epscairo font "Times,8" lw 0.5
set output 'AUGIRL.eps'
unset key
set sample 10000
set size ratio 1.5
set style data lines
set xtics format ""
set x2tics nomirror
set ytics out nomirror
set ytics 0,50 
set x2label "Distance" font "Times, 12" offset -1
set ylabel 'Depth (km)' font "Times, 12" rotate by 90
set xrange [0:5000]
set yrange [200:0]
plot   'lhmi.md'lc rgb 'red'   lw 5.0  with fsteps,\
   'GSI.md'lc rgb 'blue'   lw 5.0  with fsteps,\
   'cisi'lc rgb 'brown'   lw 5.0  with fsteps,\
   'maro'lc rgb 'yellow'   lw 5.0  with fsteps,\
   'girl'lc rgb 'pink'   lw 5.0  with fsteps,\
   'soei'lc rgb 'green'   lw 5.0  with fsteps,\
   'nawo.md'lc rgb 'cyan'   lw 5.0  with fsteps,

example files content for lhmi.md the below data on left (velocity), right (depth). other above files follows same format. LHMI at 1000 km distance, GSI.md at 2500km , cisi at 4000km distance and so on along profile.I also attacing my output image.

 0.00     3.5
 0.936    4.5
 0.9355   5.5       
 1.7153   6.5     
 2.677    7.5    
 3.6592   8.5   
 4.0028   9.5    
 4.0028   10.5   
 4.0028   11.5    
 4.0028   12.5    
 4.0028   13.5   
 4.6559   14.5    
 4.6555   16.5    
 4.6544   18.5
 4.6523   20.5
 4.6497   22.5

output

ewcz
  • 12,819
  • 1
  • 25
  • 47
rehman
  • 101
  • 7

1 Answers1

1

As far as I understand your question, it seems to me that you could just displace individual "profiles" on the x-axis. For example:

plot 'lhmi.md' u (1000+$1):($2) lc rgb 'red' lw 5.0 with fsteps

and similarly set the offsets for the other files. However, it might be necessary to scale the profile in order to make its range "visible" (since the units on the x-axis correspond to distance...):

pscale = 10.
plot 'lhmi.md' u (1000+$1*pscale):($2) lc rgb 'red' lw 5.0 with fsteps
ewcz
  • 12,819
  • 1
  • 25
  • 47