172k views
1 vote
Which is incorrect syntax for axvline() function? group of answer choices

A. plt.axvline('text') B.plt.axvline(x, ymin, ymax, 'text') C.plt.axvline(y, xmin, xmax, linewidth

User ZLNK
by
7.7k points

1 Answer

5 votes
The incorrect syntax for axvline() function is C. plt.axvline(y, xmin, xmax, linewidth. This is because axvline() is used to draw a vertical line on a plot at a specific x-coordinate, so y parameter is not applicable. Additionally, the correct syntax for axvline() function should include the x-coordinate parameter followed by any optional parameters such as ymin, ymax, and label. The correct syntax examples are:

A. plt.axvline(x='text')
B. plt.axvline(x, ymin=0, ymax=1, label='text')
User Kurasa
by
8.5k points