Code Duplication    Length = 7-9 lines in 2 locations

catalog/admin/includes/classes/phplot.php 2 locations

@@ 631-639 (lines=9) @@
628
			$ypos = $this->ytr($this->plot_min_y) + $this->x_label_height/2.0;
629
			$this->DrawText($this->x_label_ttffont, $this->x_label_angle,
630
				$xpos, $ypos, $this->ndx_label_color, $this->x_label_ttffont_size, $this->x_label_txt,'center');
631
		} else {
632
			//$xpos = 0.0 - (ImageFontWidth($this->small_font)*strlen($this->x_label_txt)/2.0) + $this->xtr(($this->plot_max_x+$this->plot_min_x)/2.0) ;
633
			$xpos = 0.0 + $this->xtr(($this->plot_max_x+$this->plot_min_x)/2.0) ;
634
			$ypos = ($this->ytr($this->plot_min_y) + $this->x_label_height/2);
635
636
			$this->DrawText($this->small_font, $this->x_label_angle,
637
				$xpos, $ypos, $this->ndx_label_color, "", $this->x_label_txt, 'center');
638
639
		}
640
		return true;
641
	}
642
@@ 650-656 (lines=7) @@
647
			$ypos = ($size[1])/2 + $this->ytr(($this->plot_max_y + $this->plot_min_y)/2.0) ;
648
			$this->DrawText($this->y_label_ttffont, 90,
649
				$xpos, $ypos, $this->ndx_label_color, $this->y_label_ttffont_size, $this->y_label_txt);
650
		} else {
651
			$xpos = 8;
652
			$ypos = (($this->small_font_width*strlen($this->y_label_txt)/2.0) +
653
					$this->ytr(($this->plot_max_y + $this->plot_min_y)/2.0) );
654
			$this->DrawText($this->small_font, 90,
655
				$xpos, $ypos, $this->ndx_label_color, $this->y_label_ttffont_size, $this->y_label_txt);
656
		}
657
		return true;
658
	}
659