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: Fri, 20 Jan 2012 08:26:03 -0500


On Fri, Jan 20, 2012 at 8:07 AM, Ben Abbott <address@hidden> wrote:
On Jan 20, 2012, at 7:45 AM, Paul Perry wrote:

> Hopefully one last request:  how do we pass additional arguments to the canvas terminal?  I'd like to pass a 'jsdir' string and 'name' parameter as in:
>
> set terminal canvas enhanced mousing size 1120,840 jsdir './js/' name 'file.js'
>
> drawnow() doesn't take these parameters.  I could not get the 'set' command to work:
>
> set(terminal,"canvas","jsdir","./js/","name","file.js","size","1120,840")
>
> hints?
>
> Thank you.

You'll need to save the gnuplot commands and edit them yourself.

What does the "jsdir './js/' name 'file.js'" part do ?

Is this something that should be included by default ?

Ben


By default the .js and .css files are set to "/tmp/gnuplot-some-dir/etc", requiring the html to be edited every time.  The jsdir parameter allows you to set the _javascript_ directory, in my case "./js/" . 

The "name" parameter outputs the canvas as a _javascript_ file which can then be included in a more complex html file.  This will allow us to just modify and include the canvas instead of re-editing the html file every time.   This change alone, would allow us to run the Octave commands and then just reload the html to view an interactive plot instead of modifying the octave output to gnuplot every time.

Thx

reply via email to

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