フィルターのクリア

How to contour plot from columns of data?

3 ビュー (過去 30 日間)
Bacha Munir
Bacha Munir 2023 年 2 月 24 日
コメント済み: Bacha Munir 2023 年 2 月 24 日
Hi. I have three columns of data. The first two columns are the x and y coordinates while the third one is the isoline column. Can anyone help me how to make a single contour plot in Matlab. I have attached the file here. Please help. Thanks.

採用された回答

Simon Chan
Simon Chan 2023 年 2 月 24 日
Use function scatter may be more suitable for you:
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/1305315/contour%20plot%20data.txt';
opts = detectImportOptions(filename);
opts.DataLines = [9 Inf];
opts.VariableNames = {'x','y','IsoLevel'};
rawdata = readtable(filename,opts);
s=scatter(rawdata.x,rawdata.y,[],rawdata.IsoLevel);
  4 件のコメント
Simon Chan
Simon Chan 2023 年 2 月 24 日
You may try to use the dot as the marker and adjust the LineWidth property in order for the plot to look like a line.
s=scatter(rawdata.x,rawdata.y,[],rawdata.IsoLevel,'.','LineWidth',1);
Bacha Munir
Bacha Munir 2023 年 2 月 24 日
Okay. Thank you so much. God bless you.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by