histPlotSeaborn Flashcards

1
Q

What parameter controls the number of bins in a Seaborn histogram?

A

The bins parameter sets the number of bins or bin edges (e.g., bins=30).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you add a Kernel Density Estimate (KDE) to a histogram?

A

Set kde=True to overlay a KDE curve.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you create a stacked histogram for grouped data?

A

Use multiple='stack' with hue to stack groups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you normalize a histogram to show probabilities?

A

Set stat='probability' to normalize the histogram.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the hue parameter do in a histogram?

A

The hue parameter splits the data into subgroups based on a categorical variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you log-scale the x-axis in a histogram?

A

Use log_scale=True or log_scale=(True, False) for x/y scaling.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the default stat value in a histogram?

A

The default is stat='count', which shows raw frequencies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do you dodge grouped histograms instead of stacking them?

A

Set multiple='dodge' to place groups side by side.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do you customize histogram colors?

A

Use color for single-color histograms or palette for hue groups.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you create a horizontal histogram?

A

Assign the variable to y instead of x (e.g., y='total_bill').

How well did you know this?
1
Not at all
2
3
4
5
Perfectly