Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f1e7d3b

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

File tree

Expand file treeCollapse file tree

1 file changed

+14
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+14
-0
lines changed

‎galleries/examples/scales/logit_demo.py

Copy file name to clipboardExpand all lines: galleries/examples/scales/logit_demo.py
+14Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.