Skip to content

Commit f1e7d3b

Browse files
authored
Merge pull request #29767 from QianZhang19/logit_demo_descri
Add description to logit_demo.py script
1 parent 73d28ee commit f1e7d3b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

galleries/examples/scales/logit_demo.py

+14
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,20 @@
44
===========
55
66
Examples of plots with logit axes.
7+
8+
This example visualises how ``set_yscale("logit")`` works on probability plots
9+
by generating three distributions: normal, laplacian, and cauchy in one plot.
10+
11+
The advantage of logit scale is that it effectively spreads out values close to 0 and 1.
12+
13+
In a linear scale plot, probability values near 0 and 1 appear compressed,
14+
making it difficult to see differences in those regions.
15+
16+
In a logit scale plot, the transformation expands these regions,
17+
making the graph cleaner and easier to compare across different probability values.
18+
19+
This makes the logit scale especially useful when visalising probabilities in logistic
20+
regression, classification models, and cumulative distribution functions.
721
"""
822

923
import math

0 commit comments

Comments
 (0)