[Top][All Lists]

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

Re: space distributed family of 2d curves

From: Teemu Ikonen
Subject: Re: space distributed family of 2d curves
Date: Thu, 25 Jul 2002 17:45:22 +0300

On 23/07/02 10:09, Ted Sariyski wrote:
> I have a 3D field and a set of 2D cross sections along z axes. I would like to
> be able to plot a family of 2D curves e.g. T(x,z_i) so that T(x,z_i) lays in
> (x,y,z_i). This is not quite a 3d object but it is not 2d either. What tools 
> should I use. I will appreciate any comments or, even better, examples.

You are probably looking for the functions image and imagesc, which display
matrices as images using an external picture viewer. If you are using linux,
it might be useful to modify image.m to use some other program than xv.
I've used the Gnome image viewer eog lately, but I'm sure there exists
better programs for scientific data. 

If you want to plot several slices using the same colormap, then you have to
scale the images yourself to fit the colormap range (from 1 to 64). imagesc
does this for you, but naturally it scales each slice differently.

There's also a routine called contour, which uses gnuplot's contour
routines. These are a bit on the slow side, but they might useful too.

Here's the last 20 or so lines from my version of image.m, you can subsitute
the eog command with the image viewer you are using.


  ## Start the viewer.  Try xv, then xloadimage.
  xv = sprintf ("xv -expand %f %s", zoom, ppm_name);
  xloadimage = sprintf ("xloadimage -zoom %f %s", zoom*100, ppm_name);
  eog = sprintf("eog --disable-sound %s", ppm_name);
  xzgv = sprintf("xzgv %s", ppm_name);
  rm = sprintf ("rm -f %s", ppm_name);
  ## Need to let the shell clean up the tmp file because we are putting
  ## the viewer in the background.
#  system (sprintf ("( %s || %s && %s ) > /dev/null 2>&1 &",
#                   xv, xloadimage, rm));
  command = sprintf ("( %s && %s ) > /dev/null 2>&1 &", eog, rm);
  system (command);


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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