Plotting circles on a 2D graph

4 Ansichten (letzte 30 Tage)
asd ad
asd ad am 14 Aug. 2020
Kommentiert: asd ad am 15 Aug. 2020
Hello everyone,
I'm trying to plot a graph showing distribution of some data with different size. So I need to plot it on a 2D graph according to size. So basically I would like to define where the droplets are on the x axis according to size as the y will be 0 except for the the initial beige amount of droplets. How do I define the position on the x-axis and the frequency of the droplets and the best way to project it on to these two axes? For example, the 2000 micrometer is on the y-axis at 0 and x-axis 0.06m.
Thanks

Akzeptierte Antwort

KSSV
KSSV am 14 Aug. 2020
If you know radius and center of cricle, you can plot circle as below:
C = rand(1,2) ; % center of circle
R = 1. ; % RAdius of circle
th = linspace(0,2*pi) ;
x = C(1)+R*cos(th) ;
y = C(2)+R*sin(th) ;
plot(x,y)
In your case, you can use scatter also. Read about it.
  5 Kommentare
KSSV
KSSV am 14 Aug. 2020
num = xlsread("Raw data.xlsx") ;
R = num(:,1) ; % sizes
x = linspace(0,1.18,length(R)) ;
y = zeros(size(R)) ;
R = R(end:-1:1) ; % Reverse R
scatter(x,y,R,R,'filled')
asd ad
asd ad am 15 Aug. 2020
thank you. it works

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by