Tuesday, 5 November 2013

Online Graph Plotter with Zoom

Please click for additional datasets to plot

This blog post contains an online (line/scatter) graph plotter for plotting multiple data series, where the x-axis is the sample index. You can also set the x-axis to any one of the datasets/groups and the y-axis to any one or more of the datasets.

Simply click on the link near the top to add extra text boxes - the first box is filled in with some default values which are plotted in the graph at the bottom, for illustration purposes - please clear this to enter the appropriate data. Each text box stores a single group/dataset and needs to be filled in with comma separated numbers. Alternatively, you can choose two file entry methods:-

  1. Select multiple single column CSV files to populate the text boxes by repeatedly pressing the Choose File button - there must be one distinct (and differently named) file for each text box i.e. one file per group. Each file can have a different number of samples.
  2. Select a single multi-column CSV file by pressing the Choose File button once, where the number of columns equals the number of groups - all groups need to have the same number of samples.

The graphs at the bottom will display either line plots or scatter plots (this is user selectable), once the Plot Graph button is pressed. There is a main/larger graph, below which lies a smaller "overview" graph.

You can initiate the zoom facility by first pressing the Plot Graph button, then selecting a rectangle in either the shorter ("overview") graph display or in the main graph. To undo the zoom process, simply press the Plot Graph button again.

If you wish to visualise the relationship between two groups (or one group against multiple groups), you can set the x-axis to any one of the groups indices and the y-axis to comma separated group numbers. Simply set the group numbers (starting from 1) in the two fields in the table below - one number for the X axis field, and either one number or comma separated numbers for the Y axis field. For the default graph plot mode (all datasets or groups, with x-axis set to the sample index), leave these fields blank.

You can select between line plotting and scatter point plotting by ticking the checkbox further down.

If you wish to examine multiple 2-D datasets (each point being represented as an (x,y) value) for a basic visual cluster analysis, you can set the number of x-axis indices to equal the number of y-axis indices in the two fields in the table directly below and select the scatter plot option. For example, if the x-coordinate of Dataset 1 was in Group 1, the y-coordinate of Dataset 1 was in Group 2, the x-coordinate of Dataset 2 was in Group 3, and the y-coordinate of Dataset 2 was in Group 4, you would enter 1,3 in the X axis group index field, and 2,4 in the Y axis group index field.


X axis group index: Y axis group index:


Line or Scatter plot
Value
Sample index
Value