9 - Plotting and Visualization

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/19

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

20 Terms

1
New cards

What is the primary Python library for creating static visualizations discussed in the document?

matplotlib

2
New cards

How do you import the pyplot module from matplotlib conventionally?

import matplotlib.pyplot as plt

3
New cards

What Jupyter notebook command enables interactive plotting?

%matplotlib notebook

4
New cards

What method creates a new figure in matplotlib?

plt.figure()

5
New cards

How do you add a subplot to a figure in matplotlib?

fig.add_subplot(rows, cols, index)

6
New cards

What is the purpose of plt.subplots()?

Creates a new figure and returns a NumPy array of subplot objects in a grid layout

7
New cards

How do you adjust spacing between subplots?

plt.subplots_adjust(wspace=None, hspace=None)

8
New cards

What does the 'k--' style option specify in matplotlib plotting?

A black dashed line

9
New cards

How do you set x-axis tick locations and labels?

ax.set_xticks() and ax.set_xticklabels()

10
New cards

What method adds a legend to a plot?

ax.legend() or plt.legend()

11
New cards

How do you add text annotations to a plot?

ax.text(x, y, 'text')

12
New cards

What method saves a figure to a file?

plt.savefig('filename.ext')

13
New cards

How do you configure global matplotlib settings?

plt.rc('component', **options)

14
New cards

What pandas attribute is used for basic plotting?

The .plot attribute (e.g., df.plot())

15
New cards

What seaborn function creates bar plots with confidence intervals?

sns.barplot()

16
New cards

How do you create a histogram in pandas?

series.plot.hist(bins=number)

17
New cards

What seaborn function creates both histogram and density plot?

sns.distplot()

18
New cards

What seaborn function creates scatter plots with regression lines?

sns.regplot()

19
New cards

What seaborn function creates a scatter plot matrix?

sns.pairplot()

20
New cards

What seaborn function is used for creating faceted plots?

sns.factorplot()