how can i draw a line on already plotted graph?
Show older comments
i was working on pearson correlation formula and was success but while plotting graph i want a line on already plotted graph like for positive correlation increasing line from (0,0) to some extent increasing like(10,10) is it possible?? how??
Answers (1)
Azzi Abdelmalek
on 3 Mar 2013
Edited: Azzi Abdelmalek
on 3 Mar 2013
Use hold on
hold on
plot([0 10],[0 10])
%or
hold on
line([0 10],[0 10])
See
doc plot
4 Comments
sampath reddy
on 3 Mar 2013
sampath reddy
on 3 Mar 2013
Azzi Abdelmalek
on 3 Mar 2013
In windows command type and tell what you've got
xlim
ylim
Image Analyst
on 3 Mar 2013
sampath, do we have to guess at your code, or are you going to speed things along by showing us your code?
Categories
Find more on Discrete Data Plots 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!