Draw a scatter plot

From CodeCodex

Revision as of 15:01, 25 August 2007 by 192.72.124.10 (Talk)

www asromacalcio it laser color all in one cloe sevigny video gratis electronica sexi malizie ray ban aviator 3243 america live in central park 1979 liengo il pozzo e pendolo corso moda novara singole hit maia dance estate 2004 rino mastrotto group sono una donna no una santa donne in strade joypad pc tarzan 1 il sesso e mrs x cartuccia 703 dual opteron fighting vipers 2 olga la tata cd baila sahara chicco orcehstra sima firenze samsung digital camera panasonic s29egs pick up isuzu dia de la bandera sampei singolo 50enne dxball acer aspire lmi www hotelami it amore con interessi misterbianco radio mp3 amstrad lettori www amnesia net training montage gosts and gosts plasma tv sony televisori vacanza gallipoli winning eleven 7 in fotografia filippine dragoste din they xacti sanyo villaggio porto ercole configura mms winf gioci facili kingston ddr 400 512 solo por ti ragazzi bassano del grappa shenyang hotel emac rebel aka unikatil disnei km0 toyota rav 4 com diesel auto km 0 kaa dlink dsl 200 modem www games com hp 735 race with the devil costi ionita ziua mea www multidiscount com magenta stay moltosugo canons pubblicita skoda octavia lettore mp3 zen nano plus 1gb bianco shapeshifters lola s theme allargamento membri ue orgasmo bianco donald oconnor lavatrici rex 6kg ininja anche su xbox calcio possibili risultati ebooks mini oggi sono io kenwood 5 1 home teatre videoproiettori a soffitto trappola di fuoco gril san juan hotel keit richards knust prestito rieti prica o vasi ladackom palline da tennis dunlop tras custodia mitac mio 168 verona singol come scrivere un curriculum revenant incompiuta tha servent luigi pulci trasporto stradale passeggeri maxtor diamondmax 10 250gb sata sms erotico kenwood kvt m700 parafrasi canto 1 inferno teen feet www 190 it vodafone live final fantasy crystal chronicles jbl 178 pavilion memoria ram eva4 designjet 30 hp stampanti a feast for me planet earth incontro donna russa la vacanza del peccatore cordless telecom guest nnp pro action video musicali blink 182 don t cry for me argentina madonna responsabile di produzione (regione friuli udine provincia) neonato pretermine hp 4250n fontevivo arena a milano religiosi nuova bmw 120 diesel auto nuove romero bersaglio al centro voli offerte va (sigla automobilistica) chaplin emma camera grosseto la fiera di san lazzaro sexo gratis body rockin cafe del mar house restless zafira 2 0 malpensa last second ingdirect it san fermin prestito piacenza calluna calcio 2006 la serata di xbox 360 nashuatec stampante samsung ml1610 drin drin rispondi fz1 my happyending no studio queen car flinestone epson c66 photo edition forum diritto film la calda vita www tiscalit it david backam chicca calcolo the fast furious pro rally 2001 compagnia carta geografica europea table tennis pro elina offerta voli aerei federico locchi vendita auto sinistrata albertina tv autoradio data morte teens for cash manga gay algol regole di gioco degli scacchi video de decapitaciones olimpiadi matematica tula fratelli paris federica panicucci video decoder digitale tele system elliot il drago invisibile il buio intorno a monica in tutti i miei giorni karaoke besar beso padme amidala goldriver black eyed peace shut up componenti elettroniche h motorola lettore mp3 capodanno parigi 2005 sick end tierd daddy yankee song name gasolina i saw you dancing madonna ray of light sdram pc 133 impianti casse acer n30 kit festiva bar uomini col culo aperto gps per nokia 6630

Related content:

Implementations

Java

2D Plot Applet

40px

This code requires Java Components for Mathematics, an external library, to run.
/*************************************************************************
*                                                                        *
*  This source code file, and compiled classes derived from it, can      *
*  be used and distributed without restriction, including for commercial *
*  use.  (Attribution is not required but is appreciated.)               * 
*                                                                        *
*   David J. Eck                                                         *
*   Department of Mathematics and Computer Science                       *
*   Hobart and William Smith Colleges                                    *
*   Geneva, New York 14456,   USA                                        *
*   Email: eck@hws.edu          WWW: http://math.hws.edu/eck/            *
*                                                                        *
*************************************************************************/



import edu.hws.jcm.awt.*;
import edu.hws.jcm.data.*;
import edu.hws.jcm.draw.*;

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import java.util.*;
import java.applet.Applet;

/**
 * A ScatterPlotApplet shows a scatter plot of data from a DataTableInput.
 * The user can enter the data in a two-column table that is shown in
 * the applet.  It is also possible to configure the applet with a menu
 * of file names.  These files, which must be in the same directory as
 * the Web page on which the applet appears, will appear in a menu.
 * A file can contain data for the table, with two numbers per line.
 * When the user loads the file, the data replaces the data in the table.
 */

public class ScatterPlotApplet extends Applet implements ActionListener {

   private Frame frame;       // If non-null, a separate window.
   private String frameTitle; // Title for the separate window.
   private Button launchButton;  // If non-null, then clicking this buttons opens a separate window.
   private String launchButtonName;  // Name for the launch button.
   
   private DataTableInput table;    //  The table for input of data.
   private ScatterPlot scatterPlot; //  The scatter plot of the data.
   private DisplayCanvas canvas;    //  The DisplayCanvas on which the plot is drawn.
   private Button loadFileButton;   //  When clicked, a data file is loaded.
   private Choice fileMenu;         //  Pop-up menu containing names of functions.
   private String[] fileNames;      //  Names of data files associated with menu entries.
   private Controller mainController;  // Controller from the main JCMPanel.

   /**
    * The init() method is called by the system to set up the applet. 
    * If the applet does not appear as a button, then init() creates the main panel of the applet
    * and calls setUpMainPanel to set it up.
    */
   public void init() {
      frameTitle = getParameter("FrameTitle"); // Get title to be used for separate window, if any.
      if (frameTitle == null) {
         frameTitle = "Scatter Plots";
         int pos = frameTitle.lastIndexOf('.');
         if (pos > -1)
            frameTitle =  frameTitle.substring(pos 1);
      }
      setLayout(new BorderLayout());
      int height = getSize().height;
      launchButtonName = getParameter("LaunchButtonName");
      if ( (height > 0