octave-maintainers
[Top][All Lists]
Advanced

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

Re: Speeding Up gnuplot Interface with Binary Data


From: Daniel J Sebald
Subject: Re: Speeding Up gnuplot Interface with Binary Data
Date: Tue, 07 Oct 2008 08:38:34 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020

Ben Abbott wrote:

On Oct 7, 2008, at 2:56 AM, Daniel J Sebald wrote:

John,

Attached is a patch using gnuplot's binary data input feature rather than ASCII data fifteen characters wide. It does appear to speed up drawing a fair amount. Less data is transmitted through the pipe, gnuplot doesn't have to input data as formated, and as I see it there is no need for handling NaN in a special way (it is just another value in IEEE format).

Let me know what you think.

Dan


Dan, great idea.

Is it possible to optionally produce the ascii so that it may be saved to a file for examination?

For example, the syntax below was used to save the gnuplot stream and examined to determine why color interpolation was not working properly.

    [... plot commands ...]
    drawnow ("x11", "/dev/null", false, "debug.gp")

The plot can then be produced from a shell by

    gnuplot --persist debug.gp

Would a conditional test on the gnuplot version number and "/dev/null" 
somewhere help?  It is easy enough to keep the old code around.  John would know better 
than I how to implement that.  The __go_drawnow__() is a builtin function so rather than 
passing an additional argument into one of the graphics functions, perhaps there is a 
better behind-the-scenes approach.  I think it would have something to do with the code 
hunk from graphics.cc:

                          if (h.ok ())
                            {
                              graphics_object go = gh_manager::get_object (h);

                              go.get_backend ()
                                .print_figure (h, term, file, mono, debug_file);
                            }
                          else

Dan


reply via email to

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