         var maxPoints = [CGPoint]()
 
         let plotMaxValue = self.plotMaxValue()
-        let interval = CGFloat(firstPlot.plotTime.timeIntervalSinceDate(self.absoluteStartDate)/60.0)
+        let interval = CGFloat(firstPlot.plotTime!.timeIntervalSinceDate(self.absoluteStartDate)/60.0)
         var x = ceil(bounds.minX + (interval*self.stepX))
 
 
         for (idx, plot) in plots.enumerate() {
             if idx > 0 {
-                let interval = CGFloat(plot.plotTime.timeIntervalSinceDate(self.absoluteStartDate)/60.0)
+                let interval = CGFloat(plot.plotTime!.timeIntervalSinceDate(self.absoluteStartDate)/60.0)
                 x = ceil(bounds.minX + (interval*self.stepX))
             }
 
-            let rMax = plot.windMax.speedConvertionTo(unit)
+            let rMax = plot.windMax!.speedConvertionTo(unit)
             let yMax = bounds.maxY - (rMax / plotMaxValue) * bounds.height
             maxPoints.append(CGPointMake(x, yMax))
 
-            let rMin = plot.windMin.speedConvertionTo(unit)
+            let rMin = plot.windMin!.speedConvertionTo(unit)
             let yMin = bounds.maxY - (rMin / plotMaxValue) * bounds.height
             minPoints.append(CGPointMake(x, yMin))
 
-            let rAvg = plot.windAvg.speedConvertionTo(unit)
+            let rAvg = plot.windAvg!.speedConvertionTo(unit)
             let yAvg = bounds.maxY - (rAvg / plotMaxValue) * bounds.height
             avgPoints.append(CGPointMake(x, yAvg))
         }



    public func drawImage() -> UIImage {

        UIGraphicsBeginImageContextWithOptions( size, false, scale)
        let context = UIGraphicsGetCurrentContext()

        drawSpeedLines(context)
        drawHourLines(context)

        }

        CGContextClosePath(context)
        CGContextDrawPath(context, CGPathDrawingMode.Stroke)

        CGContextBeginPath(context)

