If your graph was for an 'equation' which could be rearranged to y=mx+c, then you will ALWAYS get a straight line graph, & 'm' will always represent the gradient, and 'c' is always the y-intercept (the point at which the straight line crosses the y-axis, which is when x=0 )
So, if you plotted the graph of y=2x-1, gradient will be 2, y-intercept will be -1
It seems that the graph you plotted in the exercise could be written as y = 3x+c (you didn't tell us the value of c - it might be zero (?) , in which case the straight line passes through the origin ...)