if ($current_drawing != $drawing_id) {
     if ($revision_letter == "*") {
         $pdf->SetTextColor(150, 150, 150);
     } else {
         $pdf->SetTextColor(0, 0, 0);
     }
     $pdf->Cell(60, 5, $drawing_number, T, 0, L, $fill);
     $pdf->Cell(25, 5, $drawing_date, T, 0, L, $fill);
     $pdf->MultiCell(0, 5, $drawing_title, T, L, $fill);
     if ($revision_letter == "*") {
         $back_y = $pdf->GetY() - 2.5;
         $back_x = $pdf->GetX();
         $new_x = $back_x + 190;
         $pdf->SetDrawColor(150, 150, 150);
         $pdf->SetLineWidth(0.1);
         $pdf->Line($back_x, $back_y, $new_x, $back_y);
         $pdf->SetDrawColor(0, 0, 0);
         $new_y = $back_y + 2.5;
         $pdf->SetXY($back_x, $new_y);
         $pdf->SetLineWidth(0.3);
     }
     if ($revision_letter != "-") {
         $pdf->SetFont($format_font, '', 8);
         $pdf->Cell(50, 4, '', 0, 0, L, $fill);
         $pdf->Cell(10, 4, $revision_letter, 0, 0, L, $fill);
         $pdf->Cell(25, 4, $revision_date, 0, 0, L, $fill);
         $pdf->MultiCell(0, 4, $revision_desc, 0, L, $fill);
         $pdf->SetFont($format_font, '', 9);
     }
     if ($fill == 0) {
         $fill = 1;
 }
 $max_value = "£" . number_format($axis_y_max);
 $min_value = "£" . number_format($axis_y_min);
 $pdf->SetDrawColor(0);
 $x = 50;
 $y = $pdf->GetY() + 50;
 $zero = $y;
 $pdf->SetXY($x, $y);
 $height = 40;
 $range = $axis_y_max - $axis_y_min;
 $ratio = $height / $range;
 // Datum line
 $pdf->SetXY($x - 20, $y - 2.5);
 $pdf->Cell(20, 5, "£0", 0, 0, R);
 $pdf->SetXY($x, $y);
 $pdf->Line($x, $y, 280, $y);
 // Maximum line
 $pdf->SetDrawColor(200);
 $pdf->SetXY($x, $y);
 $start_y = $y - $ratio * $axis_y_max;
 $pdf->SetXY(30, $start_y - 2.5);
 $pdf->Cell(20, 5, $max_value, 0, 0, R);
 $start_y = $y - $ratio * $axis_y_max;
 $pdf->Line($x, $start_y, 280, $start_y);
 // Minimum line
 $pdf->SetXY($x, $y);
 $start_y = $y - $ratio * $axis_y_min;
 $pdf->SetXY(30, $start_y - 2.5);
 $pdf->Cell(20, 5, $min_value, 0, 0, R);
 $start_y = $y - $ratio * $axis_y_min;
 $pdf->Line($x, $start_y, 280, $start_y);