8000 Merge pull request #29768 from meeseeksmachine/auto-backport-of-pr-29… · matplotlib/matplotlib@90a5aa9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 90a5aa9

Browse files
authored
Merge pull request #29768 from meeseeksmachine/auto-backport-of-pr-29767-on-v3.10.x
Backport PR #29767 on branch v3.10.x (Add description to logit_demo.py script)
2 parents 5d62811 + f86947c commit 90a5aa9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

galleries/examples/scales/logit_demo.py

Lines changed: 14 additions & 0 deletions
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)
0