             @height = 0.3 * @width
             @width = @width - @margin.left - @margin.right
             @height = @height - @margin.top - @margin.bottom
+            @xScale = d3.scale.linear().range([0, @width]).nice()
+            @yScale = d3.scale.linear().range([0, @height]).nice()
 
         getSvg: (selector) ->
             d3.select(selector).append('svg')

                .enter()
                .append('circle')
                .attr
                    cx: (d) -> xScale d.jd
                    cy: (d) -> yScale d.magnitude
                    fill: 'red'
                    r: '2'


                .attr
                    transform: "translate(#{@margin.left},#{@margin.top})"

        getPhase: (jd) =>
            if @isPeriodic
                periods = (jd - @epoch) / @period
