in reply to Ploting a 2d graph ...Bioinformatics

Need Help?? You should ask yourself...

On a general basis, for the plotting part, first decide what you're interested to plot, then take a look at GD::Graph and GD::Graph3D.

To read the data, you can open the file, then iterate on its lines - something like this:

open my $fh, '<', $filename or die "open('$filename'): $!"; while (<$fh>) { # Do whatever you want with the line in $_ } close $fh;
Before going further, again, you must decide what you want to plot and how (e.g. you have three datasets: do you want a graph for each of them? Do you want to mix up all data? ...)

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.

Replies are listed 'Best First'.
Re^2: Ploting a 2d graph ...Bioinformatics
by Anonymous Monk on Sep 20, 2007 at 15:55 UTC
    GD::Graph can't make 2D data plots. It will only take a series of Y-values, and display them left-to-right in the order given. There's no way, for instance, to make a plot in which there are 2 points with the same X value - at least, no way I can discover.
      This is unbelievable. Don't know where you tried to discover how to do it, but the very first example in GD::Graph documentation shows you how to:
      • set your own X axis values/labels, AND
      • plot two graphs in a single chart.

      Flavio
      perl -ple'$_=reverse' <<<ti.xittelop@oivalf

      Io ho capito... ma tu che hai detto?