Closed
Description
Bug summary
In this simple test I make two scatter plots. The first one has values drawn from a uniform distribution between 0 and 1000. The second plot is the same except that values are now drawn between 0 and 1 only.
Finally, I set set_xscale("symlog")
and set_yscale("symlog")
on both plots. The result is that the first plot responds correctly, while the second plot does not change, and the data points remain in the same linear display.
Code for reproduction
# Modules #
import random
from matplotlib import pyplot
# New graph #
fig, axes = pyplot.subplots()
# Constants #
upper_bound = 1.0 # try it with 1000.0 instead and it works
# Do it #
x = [random.uniform(0.0, upper_bound) for x in range(1000)]
y = [random.uniform(0.0, upper_bound) for x in range(1000)]
pyplot.plot(x, y, 'o')
axes.set_xscale("symlog")
axes.set_yscale("symlog")
Actual outcome
Expected outcome
Additional information
This is quite a serious bug as it silently produces broken or miss-leading visualizations which then bias the interpretation of critical scientific data.
Operating system
macOS
Matplotlib Version
3.6.2
Matplotlib Backend
MacOSX
Python version
Python 3.10.8
Jupyter version
No response
Installation
conda