Re: 2D Plots
- From: "Anton " <sp6048@xxxxxx>
- Date: Fri, 5 Dec 2008 18:22:01 +0000 (UTC)
Petro - thanks for your help - your code does not do what I am trying to accomplish (I am probably not being very clear) - I want to see the axes in the 'middle' of the plot intersecting at (0,0) - nothing on the borders of the plot ...
"petro " <visualnightmare@xxxxxxxxx> wrote in message <ghaip5$q0r$1@xxxxxxxxxxxxxxxxxx>...
"Anton " <sp6048@xxxxxx> wrote in message <gha0v6$amq$1@xxxxxxxxxxxxxxxxxx>....
New to MATLAB - simple question - how do I 'fix' the axes (so that they always intersect at (0,0), for example) in a 2D plot? EG: I want to plot a unit circle with axes intersecting at origin in middle of plot ...
Hi Anton ;
I found what you asked about ( drawing unity circle with axes intersecting at origin in middle of plot ) here there are two codes you could try :
1st code ( commonly used ) ( center (0,0) & radius = 1 )
th=0:0.1:2*pi;
x=1*cos(th);
y=1*sin(th);
plot(x,y)
grid
2nd code ( center (0,0) & radius = 1 ) but with equal scale of axis
Try both & note the differenceth=linspace(0,2*pi,1000);
x=1*cos(th);
y=1*sin(th);
plot(x,y)
grid
axis equal
I hope i had answered your question
- Follow-Ups:
- Re: 2D Plots
- From: Walter Roberson
- Re: 2D Plots
- References:
- 2D Plots
- From: Anton
- Re: 2D Plots
- From: petro
- 2D Plots
- Prev by Date: Re: Beginners problem: 4 Coordinates to cut an image
- Next by Date: Re: Creating a function file in matlab that calls simulink model
- Previous by thread: Re: 2D Plots
- Next by thread: Re: 2D Plots
- Index(es):
Relevant Pages
|