[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:
>
> http://t16web.lanl.gov/Kawano/gnuplot/plotpm3d-e.html#6.9
>
> 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
(http://gnuplot.sourceforge.net/docs_4.1/node197.html).
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:
http://www.gnuplot.info/faq/faq.html#SECTION000510000000000000000
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
- [Help-gsl] Geometry, transformations, etc., Dimitris Papavasiliou, 2005/12/12
- [Help-gsl] Data Visualization, James Bergstra, 2005/12/13
- Re: [Help-gsl] Data Visualization, Jon Drews, 2005/12/13
- Re: [Help-gsl] Data Visualization, James Bergstra, 2005/12/13
- Re: [Help-gsl] Data Visualization, Martin Jansche, 2005/12/13
- Re: [Help-gsl] Data Visualization,
Peter Melchior <=
- Re: [Help-gsl] Data Visualization, James Bergstra, 2005/12/14
- Re: [Help-gsl] Data Visualization, Alessandro Toso, 2005/12/14
- Re: [Help-gsl] Data Visualization, Peter Wu, 2005/12/14
- Re: [Help-gsl] Data Visualization, Dimitris Papavasiliou, 2005/12/13
- Re: [Help-gsl] Data Visualization, Francisco Yepes Barrera, 2005/12/14
- Re: [Help-gsl] Data Visualization, HelioSoft de HÃ©lio Guilherme, 2005/12/15
- Re: [Help-gsl] Geometry, transformations, etc., Brian Gough, 2005/12/16