First horse
1, line is not equal to plot, I have checked help, many properties are different. 2, on the problem with the outer frame, plot can use box control. Line no outer frame.
3, the problem of graphics deletion. Plot can be controlled with hold on or off. Line if use Delet. It is therefore recommended that you use plot, because when you are drawing in several functions or M files, if you use line, you must record the handle value of each thread, and you need to define it as a global variable before you can use delete.
Matlab through two point drawing line problem
Clear All
Clc
Close all
A=[0 1 0 1
3 4 5 6
9 5 3 8
];
Rows=size (a,1);
Figure
For K=1:rows
Temp=a (k,:);
Line ([Temp (1,1) temp (1,2)],[temp (1,3) temp (1,4)])
Hold on
End
The results are as follows:
Url:
Matlab uses line to draw lines
Http://www.ilovematlab.cn/thread-23655-1-1.html
(Source: Matlab Chinese forum)
Matlab through two point drawing line problem
Http://www.ilovematlab.cn/thread-167905-1-1.html
(Source: Matlab Chinese forum)