About 293,000 results
Open links in new tab
  1. How do I connect points in a scatter plot with a line?

    If you want to plot both markers and a line, you can use the plot function and specify a line style that includes marker symbols and a line style, such as '-x'. For example, this code plots a line …

  2. plot scatter and line in same grid - MATLAB Answers - MathWorks

    Oct 26, 2011 · I am given a table of values that I am supposed to find a linear equation for then I am supposed to plot them both together.

  3. How to add a line to the scatter? - MATLAB Answers - MathWorks

    Apr 30, 2020 · Do you have x and y coordinate of the line? Or do you want to fit a line to the scatter points?

  4. matlab - Line of best fit scatter plot - Stack Overflow

    Aug 12, 2013 · I'm trying to do a scatter plot with a line of best fit in matlab, I can get a scatter plot using either scatter (x1,x2) or scatterplot (x1,x2) but the basic fitting option is shadowed out …

  5. MATLAB- adding a line to plot (scatter) - Stack Overflow

    line([1 N], [150 150]) hold off. axis([1 N 0 200]) pause(0.01); The post-2018b release version of this would replace line(...) with yline(height) where height = 150. More info here.

  6. In matlab, how to connect line in scatter plot without jump

    Feb 26, 2019 · Is there is elegant way to connect the line between the nearest points in scatter plot? The reason I ask is because plot will connect the line based on the 'index of row' of Y …

  7. Adding a line to a scatter plot - MATLAB Answers - MathWorks

    Jul 16, 2012 · I would now, however, like to add in a line (i.e., connect the points as if i simply used plot (x,y)). Is it possible to add a line to a plot generated from scatter or access the data …

  8. scatter - Scatter plot - MATLAB - MathWorks

    scatter(x,y,"LineWidth",2) creates a scatter plot with 2-point marker outlines. scatter(tbl,"MyX","MyY","ColorVariable","MyColors") creates a scatter plot from data in a table, …

  9. Scatter Plot in MATLAB - GeeksforGeeks

    Apr 26, 2025 · MATLAB provides a power scatter () function to plot to scatter plots with many additional options. The x_data and y_data represent vectors of equal length which are used as …

  10. Matlab scatter plot with straight lines connecting the points

    Aug 16, 2015 · You would need to perform some sort of spline interpolation to get the red line, but you desire the blue curve and so plotting the entire array in a single plot command should …

  11. Some results have been removed
Refresh