What is the difference between 'log' and 'symlog'?

what is the difference between complete and finish
what is the difference between mass and weight
what is the difference between affect and effect
what is the difference between weather and climate
what is the difference between there and their
what is the difference between pandemic and epidemic
difference between there and their examples
what is the difference between ram and rom

In matplotlib, I can set the axis scaling using either pyplot.xscale() or Axes.set_xscale(). Both functions accept three different scales: 'linear' | 'log' | 'symlog'.

What is the difference between 'log' and 'symlog'? In a simple test I did, they both looked exactly the same.

I know the documentation says they accept different parameters, but I still don't understand the difference between them. Can someone please explain it? The answer will be the best if it has some sample code and graphics! (also: where does the name 'symlog' come from?)

What's the difference between There, Their and They're?, In this example, e.g. introduces examples of citrus fruits. How do you correctly use i.e. and e.g.? One easy way to remember the difference between these two  Difference Between Batch Processing and Stream Processing (Comments Off on Difference Between Batch Processing and Stream Processing) Data is the new currency in today’s digital economy. Many organizations are leveraging big data and cloud technologies to improve the traditional IT infrastructure and support data-driven culture and decision

symlog is like log but allows you to define a range of values near zero within which the plot is linear, to avoid having the plot go to infinity around zero.

From http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.set_xscale

In a log graph, you can never have a zero value, and if you have a value that approaches zero, it will spike down way off the bottom off your graph (infinitely downward) because when you take "log(approaching zero)" you get "approaching negative infinity".

symlog would help you out in situations where you want to have a log graph, but when the value may sometimes go down towards, or to, zero, but you still want to be able to show that on the graph in a meaningful way. If you need symlog, you'd know.

What's the difference between GET & TAKE?, What is the difference between Alzheimer's and dementia? Get an overview of each and learn about early symptoms, risk factors, diagnosis and treatment. Botanically, there is a distinct difference between fruits and vegetables. However, they both come with an impressive set of nutrients and health benefits, from decreasing your risk of chronic

Here's an example of behaviour when symlog is necessary:

Initial plot, not scaled. Notice how many dots cluster at x~0

    ax = sns.scatterplot(x= 'Score', y ='Total Amount Deposited', data = df, hue = 'Predicted Category')

[ '

Log scaled plot. Everything collapsed.

    ax = sns.scatterplot(x= 'Score', y ='Total Amount Deposited', data = df, hue = 'Predicted Category')

    ax.set_xscale('log')
    ax.set_yscale('log')
    ax.set(xlabel='Score, log', ylabel='Total Amount Deposited, log')

'

Why did it collapse? Because of some values on the x-axis being very close or equal to 0.

Symlog scaled plot. Everything is as it should be.

    ax = sns.scatterplot(x= 'Score', y ='Total Amount Deposited', data = df, hue = 'Predicted Category')

    ax.set_xscale('symlog')
    ax.set_yscale('symlog')
    ax.set(xlabel='Score, symlog', ylabel='Total Amount Deposited, symlog')

What is the difference between isolation and quarantine?, While conversational use of these words might not require precise definitions, knowing the difference is important to help you better understand  Learn about the differences between a Microsoft 365 subscription, Office 2016, and the free Office Online apps.

What's The Difference Between "ie" vs. "eg"?, What is the difference between a cold and flu? Flu and the common cold are both respiratory illnesses but they are caused by different viruses. Because these  Which vs. That: What’s the Difference in Usage? To understand when to use that or which, it’s important to understand clauses.A defining clause (also called an essential clause or a restrictive clause) gives information essential to the meaning of the sentence.

Dementia vs. Alzheimer's Disease: What Is the Difference?, Learn what the differences are between a Facebook page and a Facebook profile to help you choose what's right for your business. The Dow vs. the Nasdaq: An Overview . Because of the way people throw around the phrases "the Dow" and "the Nasdaq," both terms have become synonymous with "the market" or "the economy," giving

What's the difference between a pandemic, an epidemic, endemic , Despite the long list of differences, the two masks are equivalent or nearly equivalent on the features that most people care about. WATCH:  The primary difference between a U.S. resume and an international CV is that employers in other countries, unfettered by U.S. employment discrimination laws, require more personal information than one would provide on a resume in the United States.  

Comments
  • Well... I read that, but I still don't know when I should use one or another. I was expecting some kind of graphical example so I could actually see what is the problem that symlog tries to solve.