Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper handling of very large and very small exponents with PyPlot #749

Closed
stillyslalom opened this issue Mar 27, 2017 · 3 comments
Closed
Labels

Comments

@stillyslalom
Copy link

stillyslalom commented Mar 27, 2017

Axis markers are not especially useful for large-magnitude numbers:

  • Insufficient numbers of ticks
  • No use of scientific notation
  • Lower limit not set to zero when sensible (ymax >> ymin) and padded slightly below
xx = rand(1000) ./ sqrt.(rand(1000))
yy = xx.^(-1)*1e-20
scatter(xx,yy)

oddaxis

Matplotlib's native behavior handles this correctly:

import numpy as np
from numpy.random import rand
import matplotlib.pyplot as plt

xx = rand(1000)/np.sqrt(rand(1000))
yy = (1e-20)*1./xx
plt.plot(xx, yy, "o")

image

@ChrisRackauckas
Copy link
Member

Same as #430

@mkborregaard
Copy link
Member

Nicely spotted.

@t-bltg
Copy link
Member

t-bltg commented Nov 24, 2022

Seems fixed.

@t-bltg t-bltg closed this as completed Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants