# File lib/sparklines.rb, line 308
  def discrete

    height = @options[:height].to_f
    upper = @options[:upper].to_f
    background_color = @options[:background_color]
    step = @options[:step].to_f

    width = @norm_data.size * step - 1

    create_canvas(@norm_data.size * step - 1, height, background_color)

    below_color = @options[:below_color]
    above_color = @options[:above_color]
    std_dev_color = @options[:std_dev_color]

    drawstddevbox(width,height,std_dev_color) if @options[:has_std_dev] == true

    i = 0
    @norm_data.each do |r|
      color = (r >= upper) ? above_color : below_color
      @draw.stroke(color)
      @draw.line(i, (@canvas.rows - r/(101.0/(height-4))-4).to_f,
      i, (@canvas.rows - r/(101.0/(height-4))).to_f)
      i += step
    end

    @draw.draw(@canvas)
    @canvas
  end