diff --git a/uk/ac/sanger/artemis/components/variant/GraphPanel.java b/uk/ac/sanger/artemis/components/variant/GraphPanel.java index 65411858798cd5f6142cc9c455703f3cbbdafb6a..a5a746c39e1e0a66ed6f440aed1c270869c4d3d3 100644 --- a/uk/ac/sanger/artemis/components/variant/GraphPanel.java +++ b/uk/ac/sanger/artemis/components/variant/GraphPanel.java @@ -124,20 +124,24 @@ public class GraphPanel extends JPanel plot(g2, Color.red, windowSize, plot, pixPerBase, max, -1); } + DecimalFormat df; final String maxStr; if(type == 2) { if(max == 0) return; - DecimalFormat df = new DecimalFormat("0.#"); + df = new DecimalFormat("0.#"); maxStr = df.format(100 - ((float)max/(float)windowSize *100.f)); } else - maxStr = TYPES[type] + " : " + max; + { + df = new DecimalFormat("0.0###"); + maxStr = TYPES[type] + ": " + df.format((float)max/(float)windowSize); + } FontMetrics fm = getFontMetrics(getFont()); g2.setColor(Color.black); - int xpos = getWidth() - fm.stringWidth(maxStr) - 10; + int xpos = getWidth() - fm.stringWidth(maxStr) - 8; g2.drawString(maxStr, xpos, (type == 2 ? getHeight()-fm.getHeight() : fm.getHeight())); } diff --git a/uk/ac/sanger/artemis/components/variant/VCFview.java b/uk/ac/sanger/artemis/components/variant/VCFview.java index bcd12daa8e7476406bfd9962084d77d0a5dbc30c..dc7dc9316e3495a3d959a8f9a557039006169886 100644 --- a/uk/ac/sanger/artemis/components/variant/VCFview.java +++ b/uk/ac/sanger/artemis/components/variant/VCFview.java @@ -572,7 +572,7 @@ public class VCFview extends JPanel final JCheckBoxMenuItem graphSNP = new JCheckBoxMenuItem("SNP"); final JCheckBoxMenuItem graphDP = new JCheckBoxMenuItem("Depth (DP)"); - final JCheckBoxMenuItem graphSim = new JCheckBoxMenuItem("Base Similarity"); + final JCheckBoxMenuItem graphSim = new JCheckBoxMenuItem("Base Similarity (%)"); graph.add(graphSNP); graphSNP.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent e)