Matlab Basic Plot Commands Quiz
35 fundamental questions on visualizing data in MATLAB, covering plot creation, customization, annotation, and saving.
Question 1
Which command creates a basic 2D line plot of vector y versus vector x?
Question 2
How do you add a title to the current plot?
Question 3
Which string specifier produces a red dashed line?
Question 4
How do you label the x-axis?
Question 5
What does the command 'grid on' do?
Question 6
Which command allows you to plot a second line on the existing axes without erasing the first one?
Question 7
How do you save the current figure as a PNG image named 'result.png'?
Question 8
What does the specifier 'g:o' mean?
Question 9
If you call 'plot(y)', what is used for the x-values?
Question 10
Which command closes all open figure windows?
Question 11
How do you specify a line width of 2 points?
Question 12
What is the color code for black in MATLAB plotting?
Question 13
How do you create a new, empty figure window?
Question 14
Which command adds a legend to the plot?
Question 15
What does 'axis equal' do?
Question 16
How can you plot multiple datasets in a single command?
Question 17
Which function is used to create a grid of subplots within a single figure?
Question 18
How do you turn on minor grid lines?
Question 19
What is the default line style in MATLAB?
Question 20
Which command sets the range of the x-axis manually?
Question 21
How do you plot discrete data points without connecting lines?
Question 22
What does 'clf' do?
Question 23
How do you change the font size of the title?
Question 24
Which command is used to export graphics with high resolution suitable for publication?
Question 25
What is the marker specifier for a square?
Question 26
How do you stop adding to the current plot (release the hold)?
Question 27
What does 'axis tight' do?
Question 28
Which property controls the color of the line?
Question 29
How do you add a text label at specific coordinates (x, y)?
Question 30
What does 'yyaxis right' do?
Question 31
How do you make the axes box complete (lines on top and right)?
Question 32
What is the result of 'plot(x, y, 'LineWidth', 3, 'Color', [0 0.5 0])'?
Question 33
Which command allows you to click on the plot to get coordinates?
Question 34
How do you create a logarithmic scale on the x-axis?
Question 35
What does 'gca' stand for?
