How to turn x,y,counts data into a surface map

3 ビュー (過去 30 日間)
Samuel White
Samuel White 2018 年 9 月 5 日
コメント済み: Star Strider 2018 年 9 月 5 日
Hi all, I have a text file in format x,y,count format, as in an x position, y position and a count number. I wish to make a colourmap plot of the data such that it shows regions of high counts and low counts by colour. The surf function would be ideal, only my data is not in a counts matrix. How can I form the colourmap plot?
Kind regards, Sam

採用された回答

Star Strider
Star Strider 2018 年 9 月 5 日
Plot your data using the stem3 (link) function. You can easily see if your data are gridded, since the intervals between the stem lines will be regular. If so, use the reshape (link) function to create the matrices to use with surf.
If instead your data are scattered, you will likely need to use the griddata (link) or related interpolation functions to create the necessary matrices.
  2 件のコメント
Samuel White
Samuel White 2018 年 9 月 5 日
Thank you for your help, I will give it a shot!
Star Strider
Star Strider 2018 年 9 月 5 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (1 件)

Samuel White
Samuel White 2018 年 9 月 5 日
Thank you for your help, I will give it a shot!

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by