Fixed yValue usage

Previously d.frequency was hardcoded in an equation. If you used some other `yValue`, it would return NaN which is not very much drawable.
Merge pull request #2 from mrshu/patch-1

Fixed yValue usage