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

Wrong code and spelling #34

Open
mzl9039 opened this issue Dec 12, 2021 · 2 comments
Open

Wrong code and spelling #34

mzl9039 opened this issue Dec 12, 2021 · 2 comments

Comments

@mzl9039
Copy link
Contributor

mzl9039 commented Dec 12, 2021

hi, thanks for your work on this awesome book! I just start reading and it helps me much on understanding matplotlib!

by the way, i found a mistake on Scales & projections

It is the code below:

   >>> fig = plt.figure(figsize=(6,6))
   >>> ax = plt.subplot(1, 1, 1,
                        aspect=1, xlim=[0,100], ylim=[0,100])
   >>> P0, P1, P2, P3 = (0.1, 0.1), (1,1), (10,10), (100,100)
   >>> transform = ax.transData.transform
   >>> print( (transform(P1)-transform(P0))[0] )
   4.185
   >>> print( (transform(P2)-transform(P1))[0] )
   41.85
   >>> print( (transform(P1)-transform(P0))[0] )
   418.5

the last one should be:

print( (transform(P3)-transform(P2))[0] )

same issues occurred both on checking "linear scale" and "log scale"

@mzl9039 mzl9039 changed the title wrong code and spelling Wrong code and spelling Dec 12, 2021
@rougier
Copy link
Owner

rougier commented Dec 15, 2021

You're right, thanks. Can you make a PR?

@mzl9039
Copy link
Contributor Author

mzl9039 commented Dec 16, 2021

You're right, thanks. Can you make a PR?

yeah, I think it's okay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants