Drawing circles on a x axis

4 ビュー (過去 30 日間)
Chris Dan
Chris Dan 2020 年 6 月 20 日
コメント済み: Star Strider 2020 年 6 月 20 日
Hello,
I have some data of points. I have x values of them. The y of all of them is 0
I want to draw those points as circles on the x axis.
I have attached the file with the question.
The code which I am using to load the file is
[files,pathToFiles] = uigetfile('*.mat',...
'Select One or More Files', ...
'MultiSelect', 'on');
out = {};
if ~iscell(files)
out{1} = load(fullfile(pathToFiles, files));
else
for k = 1:length(files)
out{k} = load(fullfile(pathToFiles, files{k}));
end
end
out = struct2cell(out{1});
Does anybody know how to draw them as circles..?

採用された回答

Star Strider
Star Strider 2020 年 6 月 20 日
Probably the easiest way:
D = load('NodalList.mat');
GlobalMesh = D.GlobalMesh;
figure
plot(GlobalMesh, zeros(size(GlobalMesh)), 'o', 'MarkerSize', 10)
grid
xlim([-0.05 0.55])
The scatter function allow you to individually vary the sizes and colours of the circles, if you want to do that.
.
  2 件のコメント
Chris Dan
Chris Dan 2020 年 6 月 20 日
thanks :)
Star Strider
Star Strider 2020 年 6 月 20 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by