I would like to add a trend line onto a scatter plot
19 views (last 30 days)
Show older comments
I would like to add a trend line, or lines connecting to two data plots next each other, onto a scatter plot.
Thanks,
0 Comments
Answers (1)
Image Analyst
on 22 Jul 2014
See my polyfit demo, attached below the picture.
5 Comments
Image Analyst
on 23 Jul 2014
plot() does not require the x values of the data to be equispaced.
You did not describe what the volatility smile is (so I still don't know), nor what the red and blue curves represent. Plus, I don't see any fitting/trending, just two sets of data with lines going between every adjacent pair of points.
See Also
Categories
Find more on Scatter 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!