[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Data Visualization

From: Peter Melchior
Subject: Re: [Help-gsl] Data Visualization
Date: Wed, 14 Dec 2005 19:11:37 +0100

On Tue, 2005-12-13 at 20:06 -0500, Martin Jansche wrote:

> > - could plot matrices of data as images (taking each cell as a pixel?)
> Kind of. It can be done, though gnuplot isn't specifically designed to
> do that. Nothing that a little wrapper script couldn't cure. The basic
> idea is to view the matrix as a collection of 3d points and to use
> gnuplot's 3d plotting routines.  First, make a "pseudo 3d bar graph"
> as described here:
> Then color the surface (this requires gnuplot 4.0), switch off the
> surface grid, and rotate the view so that you're looking at the
> surface straight from above. That's the gist of it; I can dig up some
> code if that would help.

It's quite easy: type "set pm3d map" in gnuplot
That does what Martin described. One little annoyance is that gnuplot
needs a blank line between data blocks, when the first coordinate
changes, like this:

x0 y0 2.41
x0 y1 3.14
x0 y2 3.67

x1 y0 3.33
x1 y1 ...

But there's a awk script that deals with this problem:

So what you then need to do is 

splot "< awk -f addblanks.awk Datafile"

where the matrix data is stored in Datafile as above but without the
need for blank lines.

Hope that helps,

Peter Melchior

reply via email to

[Prev in Thread] Current Thread [Next in Thread]