When testing plots, remember Cody Coursework executes students' code using a hosted MATLAB server. This means it will not be showing or displaying the graphics. Still, the MATLAB runtime offers access to the graphics objects' plot properties via the figure handle. Thus, you can interrogate properties and ensure the student's code is doing what's expected. Here's an example:
h = student_plot();
students_linewidth = get(h, 'LineWidth');
assert(isequal(students_linewidth,0.5),'your linewidth is incorrect');
function h = student_plot( )
Remember, Cody Coursework Test Suites give you the full power of the MATLAB language to creatively automate assessment of students' code.