Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 591c941c2fdf0a32dc57bb5f10791cde > files > 486

gnuplot-doc-4.4.0-5.fc14.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">

<!--Converted with LaTeX2HTML 2008 (1.71)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Canvas</TITLE>
<META NAME="description" CONTENT="Canvas">
<META NAME="keywords" CONTENT="gnuplot">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">

<META NAME="Generator" CONTENT="LaTeX2HTML v2008">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="gnuplot.css">

<LINK REL="next" HREF="node362.html">
<LINK REL="previous" HREF="node355.html">
<LINK REL="up" HREF="node349.html">
<LINK REL="next" HREF="node362.html">
</HEAD>

<BODY >
<!--Navigation Panel-->
<A NAME="tex2html6589"
  HREF="node362.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html6583"
  HREF="node349.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html6577"
  HREF="node360.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html6585"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html6587"
  HREF="node467.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html6590"
  HREF="node362.html">Cgi</A>
<B> Up:</B> <A NAME="tex2html6584"
  HREF="node349.html">Complete list of terminals</A>
<B> Previous:</B> <A NAME="tex2html6578"
  HREF="node360.html">Line_resources</A>
 &nbsp; <B>  <A NAME="tex2html6586"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html6588"
  HREF="node467.html">Index</A></B> 
<BR>
<BR>
<!--End of Navigation Panel-->

<H2><A NAME="SECTION05017000000000000000"></A>
<A NAME="commands_set_terminal_canvas"></A><A NAME="set_terminal_canvas"></A><A NAME="set_term_canvas"></A><A NAME="terminal_canvas"></A><A NAME="term_canvas"></A>
<BR>
Canvas
</H2>

<P>
Syntax:
<BR>
<PRE>
     set terminal canvas {size &lt;xsize&gt;, &lt;ysize&gt;} {fsize &lt;fontsize&gt;}
                         {{no}enhanced} {linewidth &lt;lw&gt;}
                         {standalone {mousing} | name '&lt;funcname&gt;'}
                         {jsdir 'URL/for/javascripts'}
                         {title '&lt;some string&gt;'}
</PRE>
<BR>

<P>
where 4#4xsize5#5 and 4#4ysize5#5 set the size of the plot area in pixels.
The default size in standalone mode is 600 by 400 pixels.
The default font size is 10.  NB: Only one font is available, the ascii
portion of Hershey simplex Roman provided in the file canvastext.js.
You can replace this with the file canvasmath.js, which contains also
UTF-8 encoded Hershey simplex Greek and math symbols.

<P>
The default <B>standalone</B> mode creates an html page containing javascript
code that renders the plot using the HTML 5 canvas element.  The html page
links to two required javascript files 'canvastext.js' and 'gnuplot_common.js'.
By default these point to local files, on unix-like systems usually in
directory /usr/local/share/gnuplot/4#4version5#5/js.  See installation notes for
other platforms. You can change this by using the <B>jsdir</B> option to specify
either a different local directory or a general URL.  The latter is usually
appropriate if the plot is exported for viewing on remote client machines.

<P>
All plots produced by the canvas terminal are mouseable.  The additional
keyword <B>mousing</B> causes the <B>standalone</B> mode to add a mouse-tracking box
underneath the plot. It also adds a link to a javascript file
'gnuplot_mouse.js' and to a stylesheet for the mouse box 'gnuplot_mouse.css'
in the same local or URL directory as 'canvastext.js'.

<P>
The <B>name</B> option creates a file containing only javascript. Both the
javascript function it contains and the id of the canvas element that it
draws onto are taken from the following string parameter.  The commands
<BR>
<PRE>
     set term canvas name 'fishplot'
     set output 'fishplot.js'
</PRE>
<BR>
will create a file containing a javascript function fishplot() that will
draw onto a canvas with id=fishplot.  An html page that invokes this
javascript function must also load the canvastext.js function as described
above.  A minimal html file to wrap the fishplot created above might be:

<P>
<BR>
<PRE>
     &lt;html&gt;
     &lt;head&gt;
         &lt;script src="canvastext.js"&gt;&lt;/script&gt;
         &lt;script src="gnuplot_common.js"&gt;&lt;/script&gt;
     &lt;/head&gt;
     &lt;body onload="fishplot();"&gt;
         &lt;script src="fishplot.js"&gt;&lt;/script&gt;
         &lt;canvas id="fishplot" width=600 height=400&gt;
             &lt;div id="err_msg"&gt;No support for HTML 5 canvas element&lt;/div&gt;
         &lt;/canvas&gt;
     &lt;/body&gt;
     &lt;/html&gt;
</PRE>
<BR>

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html6589"
  HREF="node362.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> 
<A NAME="tex2html6583"
  HREF="node349.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> 
<A NAME="tex2html6577"
  HREF="node360.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> 
<A NAME="tex2html6585"
  HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> 
<A NAME="tex2html6587"
  HREF="node467.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html6590"
  HREF="node362.html">Cgi</A>
<B> Up:</B> <A NAME="tex2html6584"
  HREF="node349.html">Complete list of terminals</A>
<B> Previous:</B> <A NAME="tex2html6578"
  HREF="node360.html">Line_resources</A>
 &nbsp; <B>  <A NAME="tex2html6586"
  HREF="node1.html">Contents</A></B> 
 &nbsp; <B>  <A NAME="tex2html6588"
  HREF="node467.html">Index</A></B> 
<!--End of Navigation Panel-->
<ADDRESS>

2010-08-17
</ADDRESS>
</BODY>
</HTML>