I am doing an assignment for my programming class, and I need to create a plot, along with a line of best fit for a few data points using only the command line in MATLAB. I
The solution to your specifiec question, is given by @M.Huster. I will just show you how you can help yourself in these cases.
Just make your plot and apply any manual changes you'd like. Then, in the figure window choose the option "Generate Code" in the File menu. This will generate an m-file that takes a dataset and recreates the figure for that dataset. If you look at that code (which is generally quite readable), you will see what commands are responsible for a certain effect.
As @M.Huster said, you can use get to get the properties, a more graphic way is using inspect(gca) and even better is the uiinspect command written by Yair Altman.