context menu appears when you do right-click on the output.
the first line is an input, with the second the output. And, right-click cos(x). Then, context menu appears.
In the context menu, there is the letter, Plots.
And, from it, to proceed to plotbuilder which appears in the next context menue from that indication of plot
in the first context menu.
And, after you opened plot builder, change various settings from pushing Option bottun in that menu.
You can change the line to dashed one. And, then click Command in that menu.
Then, the command of the figure you want to draw appears on your worksheet.
With this way, you can get the code of the graph you want to draw.