How to plot all curves according to their XY coordinates?

Hi,
In the figure attached below, each VT curve have XY cordinates. I want to plot these curves according to the XY coordinate position. How I can write my figure code. Suppose the X nd Y coordinates of first line (left side) are ''XY location X = 458158.62, Y = 6526223.5''. Similarly all the other curves have XY location values. How I can incorporate XY positions in such a way that these plots are according to respective coordinates.

9 Comments

As you have (x,y) coordinates in hand, striaght away you can use plot.
dpb
dpb on 14 Aug 2021
Edited: dpb on 14 Aug 2021
It's not at all clear to me what you would expect the resulting plot to look like...you have a series of traces of something already with a set of 2 variables to produce the above. If each trace is the recording of whatever these variables are versus som other set of coordinates/variables, best I can see would be maybe(?) a surface of one of these as the z coordinate vs the x,y.
I dunno, can't visualize what we're trying to do here from the limited information, sorry...as per usual, attaching the data as a .mat file plus in this case, perhaps a sketch of the desired result or an example of such a plot from similar data from another source would help...
The curves are already plotted to a set of (x,y) coordinates. How do the (x,y) coordinates that define the currently plotted lines differ from the (x0,y0) coordinates you'd like to plot? A brief demo may be helpful.
Hi @dpb
I have attached .mat file, have VP, TWT, XY coordinates
The give file has a single (X,Y) data. And all these points are same.
@KSSV. It is because single XY for each plot represents its poistion, these are xy coordinates, these are the horizontal and vertical addresses of any pixel
What we also need is the line(s) of code you used to generate the figure.
Now I have z file as well. Please see the attached data:
I want to plot imagesc(d, TWTi, vp). I mean TWTi along y axis and is common for all vp curves. while d is the distance between each vp curve.
Can you please help me to produce a figure?
Sorry, but I really don't know what the question is. If you want to plot imagesc(d, TWTi, vp), what's preventing you from doing so? And how does that relate to the line plot in your question?

Sign in to comment.

 Accepted Answer

load d_data.mat
load TWTi_data.mat
load vp_data_plotting.mat
vpmax = max(vp(:));
vpmin = min(vp(:));
vpave = mean(vp(:));
deltad = (max(d)-min(d))/length(d);
v = (vp - vpave)/(vpmax-vpmin) * deltad * 2 + d;
subplot(121)
plot(v, TWT1i);
set(gca, 'YDir', 'reverse');
xlabel('d');
ylabel('z');
subplot(122);
p = pcolor(d, TWT1i, vp);
p.EdgeColor = 'none';
axis ij
colorbar

5 Comments

Hi @Chunru, thank you but I ma looking for color display, like plot as imagesc or surf
like as
Thank you @Chunru, how can I change the color like jet or any else?

Sign in to comment.

More Answers (0)

Categories

Asked:

on 14 Aug 2021

Commented:

on 27 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!