Charting plugin

From Bioclipse
Jump to: navigation, search

Description

The charting plugin handles different methods of plotting/visualising data.

The plugin can create the following type of plots:

  • Scatter plots
  • Line plot
  • Time series
  • Histograms


It is possible to save plots as images in ".svg" format either by using the file icon on the toolbar of the ChartView or from the downward arrow menu

Screenshots

Scatter plot

Scatter plot.png

Line plot

Line plot.png

Time Series

Time Series.png

Histogram

Histogram.png

Usage

The plugin exposes it's functionality through a couple of static methods, these being located in net.bioclipse.chart.ChartUtils

  public static void scatterPlot(double[] xValues, double[] yValues, String xLabel, String yLabel, String title)
  
  public static void linePlot( double[] xValues, double[] yValues, String xLabel, String yLabel, String title )
  
  public static void histogram(double[] values, int bins, String xLabel, String yLabel, String title)

Calling these methods will result in the data being plotted in the view "net.bioclipse.plugins.view.ChartView"

Example

  double[] yValues = {5,7,10,3};
  double[] xValues = {1,2,3,4};
  ChartUtils.scatterPlot(xValues, yValues, "xlabel", "ylabel", "Scatter Plot");