How to plot surf or imagesc for my data?

10 ビュー (過去 30 日間)
Nisar Ahmed
Nisar Ahmed 2021 年 8 月 13 日
コメント済み: Nisar Ahmed 2021 年 8 月 27 日
This is my figure code, it comprises on 38 VP vs TWT plots as:
h = plot(VP1,TWT1,VP2+500,TWT2,VP3+1000,TWT3,VP4+1500,TWT4,VP5+2000,TWT5,VP6+2500,TWT6,...
I want to to plot it as imagesc rather than vertical curves. How can I do it?
  9 件のコメント
Nisar Ahmed
Nisar Ahmed 2021 年 8 月 27 日
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.


回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 8 月 13 日
Use the Computer Vision insertShape() function to "draw" the lines into an array. Afterwards you can image() the resulting array.
imagesc() is not really suitable for this situation: you would be storing colored pixels into the array, not relative values.
Perhaps I am misunderstanding what kind of plot you were looking for ??
If your primary purpose is just display, then I would not recommend going through the trouble of doing the insertShape -- not unless you are building an image to display on a Raspberry Pi display or to store into a file.
  4 件のコメント
Walter Roberson
Walter Roberson 2021 年 8 月 16 日
At least one of your VP* variables contains duplicate points; perhaps the line doubles back on itself.
In that situation, I am having trouble imagining what result you are hoping for.


Community Treasure Hunt

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

Start Hunting!

Translated by