Plot graph using line command
1 view (last 30 days)
Show older comments
Hi all,
I would like to know what returns the command line. For example, I have this line.
h = line([x],[y],'color','r');
Where x and y are arrays of double values. These are the values:
x =
0.3211 0.3906 0.4581 0.5233 0.5860 0.6461 0.7033 0.7576
y =
0.4400 0.5400 0.6400 0.7400 0.8400 0.9400 1.0400 1.1400
I want to plot "h" but it shows nothing.
Somebody can tell me how to generate and use "h" as a line. For example, I want to use this "h" to do intersections with other lines.
Thanks a lot.
Raúl.
0 Comments
Accepted Answer
Walter Roberson
on 25 Mar 2013
The return value from line() is the handle graphics "handle" that represents the drawn line segment and its properties. The drawn line would already be present in your figure.
line() is not a data structure for representing lines for general manipulations such as finding intersections with other lines. line() is a graphics call.
4 Comments
More Answers (0)
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!