From 704257913d94bb0313276ff34d3867dddf407ccd Mon Sep 17 00:00:00 2001 From: tcarver <tjc> Date: Tue, 13 Nov 2012 09:48:53 +0000 Subject: [PATCH] tidy --- uk/ac/sanger/artemis/components/BasePlot.java | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/uk/ac/sanger/artemis/components/BasePlot.java b/uk/ac/sanger/artemis/components/BasePlot.java index b008bd998..1d46bfb49 100644 --- a/uk/ac/sanger/artemis/components/BasePlot.java +++ b/uk/ac/sanger/artemis/components/BasePlot.java @@ -742,11 +742,9 @@ public class BasePlot extends Plot final int window_size = getWindowSize(); // the number of values to plot at each x position - final int get_values_return_count = + final int nvalues = getBaseAlgorithm().getValueCount(); - final int number_of_values = value_array_array[0].length; - boolean isWiggle = false; boolean isBlast = false; if(getAlgorithm() instanceof UserDataAlgorithm) @@ -760,17 +758,16 @@ public class BasePlot extends Plot isBlast = true; } - if(number_of_values > 1 && !isWiggle) + if(value_array_array[0].length > 1 && !isWiggle) drawGlobalAverage(g, min_value, max_value); Stroke stroke = ((Graphics2D)g).getStroke(); - for(int value_index = 0; value_index < get_values_return_count; - ++value_index) + for(int i = 0; i < nvalues; ++i) { - if(value_index < lines.length) + if(i < lines.length) { - g.setColor(lines[value_index].getLineColour()); - ((Graphics2D)g).setStroke(lines[value_index].getStroke()); + g.setColor(lines[i].getLineColour()); + ((Graphics2D)g).setStroke(lines[i].getStroke()); } else g.setColor(Color.black); @@ -785,8 +782,8 @@ public class BasePlot extends Plot drawPoints(g, min_value, max_value, step_size, window_size, getWidthInBases(), offset, - value_array_array[value_index], value_index, - get_values_return_count, isWiggle, isBlast); + value_array_array[i], i, + nvalues, isWiggle, isBlast); } ((Graphics2D)g).setStroke(stroke); @@ -877,7 +874,7 @@ public class BasePlot extends Plot } } - return get_values_return_count; + return nvalues; } -- GitLab