MATLAB Answers

Drawing circles on a x axis

2 views (last 30 days)
hamzah khan
hamzah khan on 20 Jun 2020
Commented: Star Strider on 20 Jun 2020
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));
for k = 1:length(files)
out{k} = load(fullfile(pathToFiles, files{k}));
out = struct2cell(out{1});
Does anybody know how to draw them as circles..?


Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 20 Jun 2020
Probably the easiest way:
D = load('NodalList.mat');
GlobalMesh = D.GlobalMesh;
plot(GlobalMesh, zeros(size(GlobalMesh)), 'o', 'MarkerSize', 10)
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.


Star Strider
Star Strider on 20 Jun 2020
As always, my pleasure!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!