Complete the code to plot data points with circle markers.
import matplotlib.pyplot as plt x = [1, 2, 3] y = [4, 5, 6] plt.plot(x, y, marker=[1]) plt.show()
The marker 'o' draws circle markers on the data points.
Complete the code to plot data points with square markers.
import matplotlib.pyplot as plt x = [1, 2, 3] y = [4, 5, 6] plt.plot(x, y, marker=[1]) plt.show()
The marker 's' draws square markers on the data points.
Fix the error in the code to plot data points with triangle up markers.
import matplotlib.pyplot as plt x = [1, 2, 3] y = [4, 5, 6] plt.plot(x, y, marker=[1]) plt.show()
The marker '^' draws triangle up markers on the data points.
Fill both blanks to create a plot with red diamond markers and dashed line style.
import matplotlib.pyplot as plt x = [1, 2, 3] y = [4, 5, 6] plt.plot(x, y, marker=[1], linestyle=[2], color='red') plt.show()
Marker 'd' is diamond, linestyle '--' is dashed line.
Fill all three blanks to create a plot with green plus markers, dotted line style, and linewidth 2.
import matplotlib.pyplot as plt x = [1, 2, 3] y = [4, 5, 6] plt.plot(x, y, marker=[1], linestyle=[2], linewidth=[3], color='green') plt.show()
Marker '+' draws plus signs, linestyle ':' is dotted, linewidth 2 makes line thicker.
