What is a marker in Matplotlib?
A
A line between two plots B
A label on the axis C
A symbol used to highlight data points on a plot D
A color used for the background
Analysis & Theory
A marker is a symbol used to highlight individual data points on a plot, like circles or squares.
Which marker symbol represents a circle?
A
'x' B
'o' C
's' D
'*'
Analysis & Theory
`'o'` is the marker symbol for a circle in Matplotlib.
What does the marker `'^'` represent?
A
Square B
Plus sign C
Upward triangle D
Diamond
Analysis & Theory
`'^'` is used for an upward-pointing triangle marker.
How do you add markers to a line plot in Matplotlib?
A
marker='x' B
plt.marker('x') C
plt.set_marker('x') D
plt.line(marker='x')
Analysis & Theory
Use the `marker='x'` argument inside `plt.plot()` to add markers.
Which of the following adds a red dashed line with square markers?
A
plt.plot(x, y, 'r--s') B
plt.plot(x, y, 's--r') C
plt.plot(x, y, 'r-s-') D
plt.plot(x, y, '--rs')
Analysis & Theory
`'r--s'` means red dashed line with square (`s`) markers.
Which parameter controls the size of markers?
A
markerweight B
markersize C
markerscale D
marksize
Analysis & Theory
`markersize` (or `ms`) controls how big the markers appear.
What does the marker `'D'` represent in a plot?
A
Diamond B
Dot C
Circle D
Pentagon
Analysis & Theory
`'D'` is the symbol for a diamond marker in Matplotlib.
Which keyword argument changes the marker color?
A
markercolor B
mcolor C
markerfacecolor D
color
Analysis & Theory
`markerfacecolor` sets the fill color of the marker (inside).
Which marker symbol represents a plus sign?
A
'x' B
'+' C
'p' D
'|'
Analysis & Theory
`'+'` is the marker for a plus sign in Matplotlib.
How do you change the edge color of a marker?
A
markeredgecolor='red' B
markborder='red' C
edge='red' D
markercolor='red'
Analysis & Theory
Use `markeredgecolor` to change the color of the marker's edge.