octave-maintainers
[Top][All Lists]
Advanced

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

gnuplot image code


From: John W. Eaton
Subject: gnuplot image code
Date: Tue, 24 Oct 2006 23:10:10 -0400

On 20-Oct-2006, Quentin Spencer wrote:

| function version = __gnuplot_version__
| 
|   persistent __version__ = 0;
| 
|   if !__version__
|     ## If the function hasn't been called before, use this code to get
|     ## the version from gnuplot.

What should happen if gnuplot_binary is called to specify a different
version of Octave?  Should we expect that to work without restarting
Octave?

|   ## Gnuplot reads binary files very quickly.  However, the 'fwrite' below
|   ## is much slower than using the current '__gnuplot_plot__' command.
|   fwrite(fid, A', "float", 0, "ieee-le");

Octave's fwrite function was written to handle skip, but it is not
done very efficiently, and the simple case of writing contiguous
blocks of data with one function call is not done at all (I was more
concerned with handling skip correctly).  If someone would like to
work on this project, the place to start is the function

  template <class T>
  octave_idx_type
  octave_stream::write (const Array<T>& data, octave_idx_type block_size,
                        oct_data_conv::data_type output_type,
                        octave_idx_type skip, oct_mach_info::float_format 
flt_fmt)

in src/oct-stream.cc.

Also, why not just write in the native format?

jwe


reply via email to

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