Write a wiki article on padding code
- Dominant language
- Go
- Stars
- 3k
- Forks
- 201
- PR merge metrics
- No merged PRs in 30d
Description
Original [issue 73](https://code.google.com/p/plotinum/issues/detail?id=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.
Contributor guide
Assessment
This issue has not been assessed yet.