Active3 years, 8 months ago
- Bresenhams Line Drawing Program In C
- Line Drawing Program For Mac
- Slope Intercept Line Drawing Program California
Because of the line is not going up or down, so the slope should be 0. And the line is 3 block above the 0 point, so y-inter is 3. Graphing a Line using the Slope and -intercept To graph a line using its slope and -intercept, we need to make sure that the equation of the line is in the Slope-Intercept Form, From this format, we can easily read off both the values of the slope and -intercept. Draw a line passing through the points. You might also be interested in.
I've written a program that calculates the line of best fit (intercept/slope) given several input values from the user. I've plotted each of the individual values, however unsure of the code to plot the line given the slope and y-intercept.
This is the slope:
The Intercept
Plotting of points
Any ideas? I am by no means an expert and getting this far took a fair bit of experimenting..
TaW43.7k6 gold badges33 silver badges73 bronze badges
Michael DMichael D
![Slope Intercept Line Drawing Program C Slope Intercept Line Drawing Program C](/uploads/1/2/4/7/124795983/855716671.png)
1 Answer
Assuming your data are plotted as a scattergraph using the
ChartType.Points
the simplest way to add a line is to add one extraSeries
with ChartType.Line
and set two points there. There are other ways to create a line on a
Chart
, like drawing it or creating a LineAnnotation
, but they are much more complicated!Following this example to the letter here is an implementation:
Note that after creating the series for the line of best fit the thing you were looking for are just the last two lines..:
If you want to you can add the first line point right at the y-axis:
In this case you may want to set the minimum x-values shown in the chart to prevent it from including
TaW-1
, maybe like this:Bresenhams Line Drawing Program In C
TaWLine Drawing Program For Mac
43.7k6 gold badges33 silver badges73 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.