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

Write a wiki article on padding code #100

Open
eaburns opened this issue Mar 15, 2015 · 1 comment
Open

Write a wiki article on padding code #100

eaburns opened this issue Mar 15, 2015 · 1 comment
Assignees
Labels

Comments

@eaburns
Copy link
Member

eaburns commented Mar 15, 2015

Original issue 73 created by eaburns on 2012-08-24T13:13:39.000Z:

A wiki article could help demystify the plot's padX and padY functions a lot.

X transform is x * (da.Max - da.Min) + da.Min:

l.X * (newMax - newMin) + newMin = da.Min - l.Min.X (we subtract l.Min.X because it's given as a negative value). So, the X location of our left-most glyph will transform it to a location that has room for its left-most edge to lie directly on da.Min.

We also want:

r.X * (newMax - newMin) + newMin = da.Max - (r.Min.X + r.Size.X). This is the same as above, but we are dealing with the right-most edge of the right-most glyph and we want it to end up at da.Max.

@eaburns
Copy link
Member Author

eaburns commented Mar 15, 2015

Comment #1 originally posted by eaburns on 2013-02-20T19:24:28.000Z:

<empty>

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

1 participant