Search Header Logo

Python Review Module 15 - Plotting

Authored by Karen Diggs

Science, Other

University

Used 17+ times

Python Review Module 15 - Plotting
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

9 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function takes an optional format string argument to specify the color and style of the plotted line?

plt.show()

plt.imshow()

plt.legend()

plt.plot()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which property is required for plt.legend()?

alpha

data

visible

label

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which package is used for plotting in Python?

matlab

ggplot

matplotlib

matlablib

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function plots data onto the graph?

plt.show()

plt.imshow()

plt.legend()

plt.plot()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to add text labels to a plot?

plt.title()

plt.xlabel()

plt.legend()

plt.text()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Identify the correct syntax for text() function to display 'X Y Plot' at the coordinates (x,y) in grey color and font size 12.

plt.text('X Y Plot', [x,y], color='grey', fontsize=12)

plt.text((x,y), 'X Y Plot',color='grey', fontsize=12)

plt.text(x,y, 'X Y Plot', color='grey', fontsize=12)

plt.text([x,y], 'X Y Plot', color='grey', fontsize=12)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Identify the correct syntax to annotate the data point at (5,2) placing the text 'Peak' at (5,3).

plt.annotate('Peak', xy=(5, 2), xytext=(5, 3))

plt.annotate('Peak', xy=(5, 3), xytext=(5, 2))

plt.annotate(xy=(5, 2), xytext=(5, 3))

plt.annotate(xy=(5, 3), xytext=(5, 2))

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?

Discover more resources for Science