Skip to content

Wrong code and spelling #34

Open
Open
@mzl9039

Description

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"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions