Here is an app I have to write for college, and I've got it written, but when I graph the outputs, two sets of values are very similar.

And when I round the numbers to integers and what not to fit onto the graph, the two lines are on top of one another.

Here is the code.
It just compares the time taken to sort numbers using three different algorithms.
But BubbleSort and LinearSort are so similar its impossible to tell the lines apart.

Just copy and paste the code into a plot.java file, compile and run and you'll see what I mean...

Code:
//
// Jamie Plenderleith
// [email protected]
//

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.lang.Math;
import java.util.Date;

public class plot extends Frame implements WindowListener {
	

	// Variables are declared here as most require global scope 
	//
	final static int     REPETITIONS  = 5            ;
	final static boolean showProgress = false		 ;
	final static boolean showResults  = true		 ;	
	
	final static int     BUBBLESORT   = 0            ;
	final static int     LINEARSORT   = 1            ;
	final static int     SASASORT     = 2            ;
	
	final static Color   BUBBLECOLOR  = Color.blue   ;
	final static Color   LINEARCOLOR  = Color.cyan   ;
	final static Color   SASACOLOR    = Color.green  ;
		
	static BBBSort   BubbleSort       = new BBBSort();
	static LSSort    LinearSort       = new LSSort() ;
	static SASA      SASASort         = new SASA()   ;
		
	static int[]     BubbleTotals     = new int[10]  ;
	static int[]     LinearTotals     = new int[10]  ;
	static int[]     SASATotals       = new int[10]  ;
		
	static boolean   finishedAverages = false        ;
	static int[]     randomArray                     ;	

	
	public static void main (String[] args) {
		Frame plot = new plot();
	}
	
	public plot() {
		this.setSize( 500, 500 );
		this.setResizable( false );
		this.setBackground( Color.white );
		this.setVisible( true );
		this.setTitle( "Computer Science Tutorial 3 - Plotter Application" );		
		doStart();	
		this.repaint();
	}	
	
	public void paint( Graphics g ) { 
		if ( ! finishedAverages ) {
			g.setColor( Color.red );
			g.drawString(" Working ...  Please Wait ...", 50, 75);
		} else {
			drawAxes  ( g             );
			drawLabels( g             );
			drawValues( g, BUBBLESORT, BUBBLECOLOR );
			drawValues( g, LINEARSORT, LINEARCOLOR );
			drawValues( g, SASASORT  , SASACOLOR   );
		}
	}
	
	private static void drawAxes( Graphics g ) {
		g.setColor ( Color.black      );
		g.clearRect( 0 , 0  , 100, 100);
		g.drawLine ( 50, 75 , 50 , 450);
		g.drawLine ( 50, 450, 450, 450);
	}
	private static void drawLabels( Graphics g ) {
		g.setColor( Color.blue );
		int i;
		for (i = 25; i <= 250; i = i + 25) {
			g.drawString( Integer.toString(i), (int)(50 + (i * 1.5)), 465 );
		}
		for (i = 7000; i >= 0; i = i - 1000) {
			g.drawString( Integer.toString(i), 20, 450 - (i / 20) );
		}		
	}
	private static void drawValues( Graphics g , int which , Color color) {
		g.setColor( color );
		int currX, currY, nextX, nextY;
		switch ( which ) {
			case BUBBLESORT: {					
				for (int n = 25; n <= 225; n = n + 25) {					
					currX = (int)(50 + (n * 1.5));
					currY = 450 - (BubbleTotals[( n / 25) - 1] / 20);
					nextX = (int)(50 + ((n + 25) * 1.5));
					nextY = 450 - (BubbleTotals[( n / 25)] / 20);
					
					g.drawOval( currX, currY, 1, 1);
					g.drawLine( currX, currY, nextX, nextY);
				}
			}
			case LINEARSORT: {
				
				for (int n = 25; n <= 225; n = n + 25) {					
					currX = (int)(50 + (n * 1.5));
					currY = 450 - (LinearTotals[( n / 25) - 1] / 20);
					nextX = (int)(50 + ((n + 25) * 1.5));
					nextY = 450 - (LinearTotals[( n / 25)] / 20);

					g.drawOval( currX, currY, 1, 1);
					g.drawLine( currX, currY, nextX, nextY);
				}
			}
			case SASASORT: {
				
				for (int n = 25; n <= 225; n = n + 25) {
					currX = (int)(50 + (n * 1.5));
					currY = 450 - (SASATotals[( n / 25) - 1] / 20);
					nextX = (int)(50 + ((n + 25) * 1.5));
					nextY = 450 - (SASATotals[( n / 25)] / 20);
					
					g.drawOval( currX, currY, 1, 1);
					g.drawLine( currX, currY, nextX, nextY);
				}
			}
								 
		}
		
	}

	private static void doStart() {
		System.out.println();
		for (int n = 25; n <= 250; n = n + 25) {	
			if ( showProgress ) { System.out.println("Calculating for " + n + " values. " + REPETITIONS + " repetitions."); }
			for (int j = 0; j < REPETITIONS; j++) {
				if ( showProgress ) { System.out.print( j + ", "); }
				randomArray = generateRandomArray( n );
				BubbleTotals[(n / 25) - 1] = BubbleTotals[(n / 25) - 1] + BubbleSort.doSort( randomArray );
				LinearTotals[(n / 25) - 1] = LinearTotals[(n / 25) - 1] + LinearSort.doSort( randomArray );
				SASATotals  [(n / 25) - 1] = SASATotals  [(n / 25) - 1] + SASASort.doSort  ( randomArray );
			}
			if ( showProgress ) { System.out.println(); }
			BubbleTotals[(n / 25) - 1] = (BubbleTotals[(n / 25) - 1] / REPETITIONS) / n;
			LinearTotals[(n / 25) - 1] = (LinearTotals[(n / 25) - 1] / REPETITIONS) / n;
			SASATotals  [(n / 25) - 1] = (SASATotals  [(n / 25) - 1] / REPETITIONS) / n;			
		}
		
		if ( showResults ) {
			System.out.println("Average number of operations times n, for n values : ");
			for (int i = 1; i <= 10; i++) {
				System.out.println("    Averages for " + ( i * 25 ) + " numbers : ");
				System.out.println("        BubbleSort : " + BubbleTotals[i - 1])   ;
				System.out.println("        LinearSort : " + LinearTotals[i - 1])   ;
				System.out.println("        SASASort   : " + SASATotals  [i - 1])   ;
				System.out.println(                                             )   ;
			}
		}
		finishedAverages = true;
		
	}
	
	private static int[] generateRandomArray( int size ) {
		int retVal[] = new int[size];
		for (int i = 0; i < size; i ++) 
			retVal[i] = (int)(Math.random() * size);
		
		return retVal;
	}
	
	
	
	public void windowClosing    ( WindowEvent e ) { System.exit( 0 ); }
	public void windowClosed     ( WindowEvent e ) { }
	public void windowOpened     ( WindowEvent e ) { }
	public void windowDeiconified( WindowEvent e ) { }
	public void windowActivated  ( WindowEvent e ) { }
	public void windowDeactivated( WindowEvent e ) { }
	public void windowIconified  ( WindowEvent e ) { }

	
}



// Bubble Sort Algorithm
//
class BBBSort {
	public static int doSort( int[] arr ) {						
		int i, temp,  n = arr.length, total = 0;
		int[] sortlist = new int[arr.length];
		boolean swap = true;
		System.arraycopy(arr, 0, sortlist, 0, arr.length);
		while( swap ) {			    
		    swap = false;
		    for(i = 0; i < n - 1; i++) {
				total++;
				if ( sortlist[i] > sortlist[i + 1] ) {
				    temp = sortlist[i + 1];
				    sortlist[i + 1] = sortlist[i];
				    sortlist[i] = temp;	
				    swap = true;
				}	   
			}
		    n--;
		}
		return total;
	}
}


// Linear Sequential Sort Algorithm
//
class LSSort {
	public static int doSort( int[] arr ) {
		int i, j, smval, smpos, temp, total = 0;
		int[] sortlist = new int[arr.length];
		System.arraycopy(arr, 0, sortlist, 0, arr.length);		
		for(i = 0; i < sortlist.length; i++) {
		    smval = sortlist[i];
		    smpos = i;
		    for(j = i + 1; j < sortlist.length; j++) {
				if(sortlist[j] < smval) {
				    smval = sortlist[j];
				    smpos = j;
				}
				total++;
		    }
		    temp = sortlist[smpos];
		    sortlist[smpos] = sortlist[i];
		    sortlist[i] = temp;
		}
		return total;	
	}
}


// Swap And Start Again Algorithm
//
class SASA {
	public static int doSort( int[] arr ) {
		int[] sortlist = new int[arr.length];
		int i, temp, total = 0;
		System.arraycopy(arr, 0, sortlist, 0, arr.length);		
		for(i = 0; i < sortlist.length - 1; i++) {
		    total++;
		    if( sortlist[i] > sortlist[i + 1]) {
				temp = sortlist[i + 1];
				sortlist[i + 1] = sortlist[i];
				sortlist[i] = temp;			
				i = -1;
		    }	    
		}
		return total;
	}
}