<!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>Binary matrix</TITLE> <META NAME="description" CONTENT="Binary matrix"> <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="node338.html"> <LINK REL="previous" HREF="node336.html"> <LINK REL="up" HREF="node336.html"> <LINK REL="next" HREF="node338.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html6033" HREF="node338.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html6027" HREF="node336.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html6021" HREF="node336.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html6029" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html6031" HREF="node467.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html6034" HREF="node338.html">Example datafile</A> <B> Up:</B> <A NAME="tex2html6028" HREF="node336.html">Data-file</A> <B> Previous:</B> <A NAME="tex2html6022" HREF="node336.html">Data-file</A> <B> <A NAME="tex2html6030" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html6032" HREF="node467.html">Index</A></B> <BR> <BR> <!--End of Navigation Panel--> <H3><A NAME="SECTION040261100000000000000"></A> <A NAME="commands_plot_datafile_binary_matrix"></A><A NAME="commands_splot_datafile_binary_matrix"></A><A NAME="plot_datafile_matrix_binary"></A><A NAME="splot_datafile_matrix_binary"></A><A NAME="plot_binary_matrix"></A><A NAME="splot_binary_matrix"></A><A NAME="plot_matrix_binary"></A><A NAME="splot_matrix_binary"></A><A NAME="matrix_binary"></A><A NAME="binary_matrix"></A><A NAME="gpbin"></A><A NAME="7705"></A> <BR> Binary matrix </H3> Gnuplot can read matrix binary files by use of the option <B>binary</B> appearing without keyword qualifications unique to general binary, i.e., <B>array</B>, <B>record</B>, <B>format</B>, or <B>filetype</B>. Other general binary keywords for translation should also apply to matrix binary. (See <B>binary general (p. <A HREF="node117.html#binary_general"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="crossref.png"></A>)<A NAME="7712"></A></B> for more details.) <P> In previous versions, <B>gnuplot</B> dynamically detected binary data files. It is now necessary to specify the keyword <B>binary</B> directly after the filename. <P> Single precision floats are stored in a binary file as follows: <P> <BR> <PRE> <N+1> <y0> <y1> <y2> ... <yN> <x0> <z0,0> <z0,1> <z0,2> ... <z0,N> <x1> <z1,0> <z1,1> <z1,2> ... <z1,N> : : : : ... : </PRE> <BR> <P> which are converted into triplets: <BR> <PRE> <x0> <y0> <z0,0> <x0> <y1> <z0,1> <x0> <y2> <z0,2> : : : <x0> <yN> <z0,N> </PRE> <BR> <P> <BR> <PRE> <x1> <y0> <z1,0> <x1> <y1> <z1,1> : : : </PRE> <BR> <P> These triplets are then converted into <B>gnuplot</B> iso-curves and then <B>gnuplot</B> proceeds in the usual manner to do the rest of the plotting. <P> A collection of matrix and vector manipulation routines (in C) is provided in <B>binary.c</B>. The routine to write binary data is <P> <BR> <PRE> int fwrite_matrix(file,m,nrl,nrl,ncl,nch,row_title,column_title) </PRE> <BR> <P> An example of using these routines is provided in the file <B>bf_test.c</B>, which generates binary files for the demo file <B>demo/binary.dem</B>. <P> The <B>index</B> keyword is not supported, since the file format allows only one surface per file. The <B>every</B> and <B>using</B> filters are supported. <B>using</B> operates as if the data were read in the above triplet form. <P> See also <B>binary general (p. <A HREF="node117.html#binary_general"><IMG ALIGN="BOTTOM" BORDER="1" ALT="[*]" SRC="crossref.png"></A>)<A NAME="7733"></A></B> and <P> http://www.gnuplot.info/demo/binary.html<TT>Binary File Splot Demo. </TT> <P> <HR> <!--Navigation Panel--> <A NAME="tex2html6033" HREF="node338.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A> <A NAME="tex2html6027" HREF="node336.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A> <A NAME="tex2html6021" HREF="node336.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A> <A NAME="tex2html6029" HREF="node1.html"> <IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A> <A NAME="tex2html6031" HREF="node467.html"> <IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="index.png"></A> <BR> <B> Next:</B> <A NAME="tex2html6034" HREF="node338.html">Example datafile</A> <B> Up:</B> <A NAME="tex2html6028" HREF="node336.html">Data-file</A> <B> Previous:</B> <A NAME="tex2html6022" HREF="node336.html">Data-file</A> <B> <A NAME="tex2html6030" HREF="node1.html">Contents</A></B> <B> <A NAME="tex2html6032" HREF="node467.html">Index</A></B> <!--End of Navigation Panel--> <ADDRESS> 2010-08-17 </ADDRESS> </BODY> </HTML>