フィルターのクリア

Plotting data as points onto a previously generated graph

1 回表示 (過去 30 日間)
INDS
INDS 2020 年 1 月 13 日
コメント済み: Bhaskar R 2020 年 1 月 13 日
I have this data stored as a variable and wanted to plot it onto a graph produced by a different script. I want these to be plotted as points on the graph as opposed to a line. I was wondering what code would be used to do so. Thank you!
(The left column is the y coordinates and the right column is the x coordinates)
ans =
233.0000 0.2200
253.0000 1.0571
257.0000 1.8943
237.0000 2.7057
229.0000 3.5171
242.0000 4.3286
254.0000 5.1686
240.0000 5.8429
242.0000 6.8657
243.0000 7.7314
250.0000 8.5657

採用された回答

Bhaskar R
Bhaskar R 2020 年 1 月 13 日
x = [
233.0000 0.2200
253.0000 1.0571
257.0000 1.8943
237.0000 2.7057
229.0000 3.5171
242.0000 4.3286
254.0000 5.1686
240.0000 5.8429
242.0000 6.8657
243.0000 7.7314
250.0000 8.5657] % your data
plot(x(:, 2), x(:, 1), 'o', 'Color','r'),grid on; % plotting
  2 件のコメント
INDS
INDS 2020 年 1 月 13 日
This works perfectly. Thank you!
Bhaskar R
Bhaskar R 2020 年 1 月 13 日
You are welcome !!

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by