Sometimes, you’re using a variable that is not categorical (known as a continuous variable) to predict a categorical variable. For example, imagine that you had the measurement of height for several babies, and you wanted to know how well that predicted weather they had taken their first steps. In this case, you could do a scatterplot, but the Y axis would not be a number, but two categories. You could approximate it as the numbers zero and one (04 “have not taken their first step”expensive), but it will be a kind of ugly seaborn scatterplot. If you try to fit a line to it, it will also be pretty uninformative, nearly flipping up or down without giving a sense of where The probability really changes.
This is where a logistic regression is valuable. Fortunately, plotting one is extremely easy with the package seaborn. All that you need to do is use the command LM plot, and enter argument logistic equal true. Take a look at how that appears in contrast to. The same data plotted with default settings. One other useful thing to do, is open “jitter” the points, and also set the Alpha.