Summary unavailable.

Questions

Question 1

What is the primary purpose of the `%matplotlib inline` command when used in a Jupyter notebook?

View answer and explanation
Question 2

Which method is used to add a subplot to an existing Figure object in matplotlib?

View answer and explanation
Question 3

In the command `fig.add_subplot(2, 2, 1)`, what does the argument `1` represent?

View answer and explanation
Question 4

What is the more convenient alternative to `fig.add_subplot` for creating a figure and a grid of subplots simultaneously, which also returns a NumPy array of the subplot objects?

View answer and explanation
Question 5

What do the `sharex` and `sharey` arguments in `plt.subplots()` achieve when set to True?

View answer and explanation
Question 6

In `fig.subplots_adjust(wspace=0, hspace=0)`, what is the effect on the plot layout?

View answer and explanation
Question 7

Which argument is used in plotting functions like `ax.plot` to specify the style of the line, for example, to make it dashed?

View answer and explanation
Question 8

In a line plot, what is the purpose of the `marker` argument?

View answer and explanation
Question 9

How can you alter the default linear interpolation between points in a line plot to a step-like pattern?

View answer and explanation
Question 10

Which method is used to explicitly set the tick locations on the x-axis of a matplotlib subplot?

View answer and explanation
Question 11

What is the easiest way to add a legend to a matplotlib plot that identifies different plotted elements?

View answer and explanation
Question 12

Which function is used to add annotations that can consist of both text and an arrow to a subplot?

View answer and explanation
Question 13

To add a shape like a `Rectangle` or `Circle` to a subplot, you create a patch object and then pass it to which method?

View answer and explanation
Question 14

When saving a figure using `fig.savefig()`, what does the `dpi` option control?

View answer and explanation
Question 15

Which function is used to programmatically modify matplotlib's global configuration parameters, such as the default figure size?

View answer and explanation
Question 16

By default, what type of plot does the `.plot()` method on a pandas Series or DataFrame create?

View answer and explanation
Question 17

When plotting a pandas DataFrame, what is the default behavior regarding its columns?

View answer and explanation
Question 18

In the context of a pandas DataFrame plot, what does the argument `subplots=True` do?

View answer and explanation
Question 19

How do you create a stacked bar plot from a pandas DataFrame?

View answer and explanation
Question 20

What is a useful recipe for visualizing the frequency of values in a pandas Series using a bar plot?

View answer and explanation
Question 21

In the `seaborn.barplot` function, what does the `data` argument typically expect?

View answer and explanation
Question 22

When using `seaborn.barplot`, if there are multiple observations for each category on the y-axis, what do the bars represent by default?

View answer and explanation
Question 23

In `seaborn.barplot`, what is the purpose of the `hue` argument?

View answer and explanation
Question 24

What is a key difference between a histogram and a density plot?

View answer and explanation
Question 25

Which seaborn function is particularly useful for examining the relationship between two one-dimensional data series by making a scatter plot and fitting a linear regression line?

View answer and explanation
Question 26

What is a pairs plot (or scatter plot matrix), and which seaborn function can create it?

View answer and explanation
Question 27

In the `sns.pairplot` function, what does the `diag_kind='kde'` argument specify?

View answer and explanation
Question 28

What is a facet grid, as created by `seaborn.catplot`?

View answer and explanation
Question 29

In `sns.catplot`, which arguments are used to create a facet grid by splitting the data into subplots based on the values of certain columns?

View answer and explanation
Question 30

What type of plot does `sns.catplot(..., kind='box')` create?

View answer and explanation
Question 31

To ensure subplots in a 2x2 grid created with `plt.subplots(2, 2)` have the same y-axis ticks for comparison, which argument should be used?

View answer and explanation
Question 32

What is the return type of the `plt.subplots(2, 3)` command?

View answer and explanation
Question 33

What does the `alpha` style option, such as `alpha=0.3`, control in a plot?

View answer and explanation
Question 34

If you call `ax.set_xticklabels(["one", "two", "three"], rotation=30)`, what is the effect of `rotation=30`?

View answer and explanation
Question 35

What is the purpose of the `loc` argument in the `ax.legend()` method?

View answer and explanation
Question 36

How can you save a plot to a 400 DPI PNG file named 'my_figure.png' using a Figure object `fig`?

View answer and explanation
Question 37

In a pandas DataFrame plot, what does the `layout` argument, such as `layout=(2, 2)`, specify?

View answer and explanation
Question 38

Which pandas function is described as a convenient way to compute a simple frequency table from two DataFrame columns, which can then be used for plotting?

View answer and explanation
Question 39

Which seaborn function is used to change the aesthetics of plots, such as the plot background and grid line colors, with predefined themes like 'whitegrid'?

View answer and explanation
Question 40

What is another name for a density plot, based on the method used to create it?

View answer and explanation
Question 41

The `kind` argument in pandas' `.plot()` method can be set to 'barh'. What type of plot does this create?

View answer and explanation
Question 42

What does a box plot, as created by `sns.catplot(kind='box', ...)` or other methods, show?

View answer and explanation
Question 43

What is the primary function of the seaborn library as described in the text?

View answer and explanation
Question 44

When creating a histogram for tip percentages using `tips["tip_pct"].plot.hist(bins=50)`, what does the argument `bins=50` accomplish?

View answer and explanation
Question 45

Which command would you use to change the default seaborn color palette to a greyscale one suitable for black-and-white print?

View answer and explanation
Question 46

In a pandas DataFrame plot, what does the argument `sort_columns` do?

View answer and explanation
Question 47

What does the `figsize` argument, such as `figsize=(8, 6)`, specify when used in a plotting function like `plt.figure` or `plt.subplots`?

View answer and explanation
Question 48

When calling a pandas Series plot method like `s.plot()`, what is used for the x-axis by default?

View answer and explanation
Question 49

According to the text, in seaborn's `barplot`, what do the black lines drawn on the bars represent by default?

View answer and explanation
Question 50

You have a pandas DataFrame with columns `A` and `B`. Which is the correct syntax to create a vertical bar plot of column `A`?

View answer and explanation