help-octave
[Top][All Lists]
Advanced

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

Re: How do I use octave gnuplot to html5 canvas terminal?


From: Paul Perry
Subject: Re: How do I use octave gnuplot to html5 canvas terminal?
Date: Thu, 19 Jan 2012 14:40:09 -0500

Gnuplot 4.4 seems to have this terminal.  In the documentation ( http://www.gnuplot.info/docs_4.4/gnuplot.pdf ) section 83.7 (pp. 189) they describe the following commands:

set term canvas name 'fishplot'
set output 'fishplot.js'

I installed a gnuplot-4.4.3-aqua-i386.dmg for Octave 3.4.  Starting just Gnuplot and typing "set terminal canvas" worked.  plot(rand(3)) resulted in an html output.  So it looks like I'm close! 

I'd have to figure out how to modify the Octave files you list.

Thanks.

p.s. Here are some demos: http://gnuplot.sourceforge.net/demo_canvas/

How do I find which version of gnuplot I installed with Octave 3.4 

On Thu, Jan 19, 2012 at 9:47 AM, Ben Abbott <address@hidden> wrote:
On Jan 19, 2012, at 6:48 AM, Paul Perry wrote:

> I am on a Mac OS X 10.6.8 Octave 3.4 and I would like to output a plot to an html5 canvas? How do I send a command to gnuplot to set the terminal to canvas?  Is this supported?

Octave doesn't yet include support for gnuplot's html5 terminal.

I'll need to look at the appropriate gnuplot docs to include it. Can you tell me which version of gnuplot has this terminal ?

If you're interested in trying to modify Octave to enable the htlm5 terminal, the sources to patch are ...

       __gnuplot_drawnow__.m: gnuplot_set_term()
       __gnuplot_drawnow__.m: gnuplot_is_enhanced_term()

Once html5 is added there, you can produce a plot with ...

       plot (rand (3))
       drawnow ("html5", "plot.html5", false, "/dev/null")

I've been considering modifying __gnuplot_drawnow__.m to support gnuplot terminals that are not explicitly supported by Octave. Perhaps this is an opportunity to me to do that.

To add html5 support the print(), then the sources to modify include ...

       print.m
       __gnuplot_print__.m

Ben


reply via email to

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