
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.miscdebris.net/plplot_wiki/index.php?action=history&amp;feed=atom&amp;title=OCaml_tutorial</id>
		<title>OCaml tutorial - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.miscdebris.net/plplot_wiki/index.php?action=history&amp;feed=atom&amp;title=OCaml_tutorial"/>
		<link rel="alternate" type="text/html" href="http://www.miscdebris.net/plplot_wiki/index.php?title=OCaml_tutorial&amp;action=history"/>
		<updated>2026-04-30T03:26:13Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.4</generator>

	<entry>
		<id>http://www.miscdebris.net/plplot_wiki/index.php?title=OCaml_tutorial&amp;diff=2208&amp;oldid=prev</id>
		<title>Hcarty: /* Using the Quick_plot module */ Fix plot axis labeling</title>
		<link rel="alternate" type="text/html" href="http://www.miscdebris.net/plplot_wiki/index.php?title=OCaml_tutorial&amp;diff=2208&amp;oldid=prev"/>
				<updated>2009-10-18T20:06:40Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Using the Quick_plot module: &lt;/span&gt; Fix plot axis labeling&lt;/span&gt;&lt;/p&gt;
&lt;table class=&#039;diff diff-contentalign-left&#039;&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;col class=&#039;diff-marker&#039; /&gt;
				&lt;col class=&#039;diff-content&#039; /&gt;
				&lt;tr style=&#039;vertical-align: top;&#039;&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&#039;2&#039; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 20:06, 18 October 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; Quick_plot.func&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; Quick_plot.func&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; ~labels:(&amp;quot;Angle (radians)&amp;quot;, &amp;quot;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Amplitude&lt;/del&gt;&amp;quot;, &amp;quot;A few functions&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; ~labels:(&amp;quot;Angle (radians)&amp;quot;, &amp;quot;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;f(x)&lt;/ins&gt;&amp;quot;, &amp;quot;A few functions&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; ~names:[&amp;quot;sin&amp;quot;; &amp;quot;cos&amp;quot;]&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; ~names:[&amp;quot;sin&amp;quot;; &amp;quot;cos&amp;quot;]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; [sin; cos] (-3.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;14&lt;/del&gt;, 3.&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;14&lt;/del&gt;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; [sin; cos] (-3.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;15&lt;/ins&gt;, 3.&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;15&lt;/ins&gt;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;with output which looks something like this:&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;with output which looks something like this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Hcarty</name></author>	</entry>

	<entry>
		<id>http://www.miscdebris.net/plplot_wiki/index.php?title=OCaml_tutorial&amp;diff=2204&amp;oldid=prev</id>
		<title>Hcarty: Created page with &#039;== Intro ==  The [http://caml.inria.fr OCaml] bindings for PLplot provide three means of accessing PLplot&#039;s functionality through three modules, Plplot, Plplot.Plot and Plplot.Qu…&#039;</title>
		<link rel="alternate" type="text/html" href="http://www.miscdebris.net/plplot_wiki/index.php?title=OCaml_tutorial&amp;diff=2204&amp;oldid=prev"/>
				<updated>2009-10-06T16:42:30Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;== Intro ==  The [http://caml.inria.fr OCaml] bindings for PLplot provide three means of accessing PLplot&amp;#039;s functionality through three modules, Plplot, Plplot.Plot and Plplot.Qu…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Intro ==&lt;br /&gt;
&lt;br /&gt;
The [http://caml.inria.fr OCaml] bindings for PLplot provide three means of accessing PLplot&amp;#039;s functionality through three modules, Plplot, Plplot.Plot and Plplot.Quick_plot.  In versions 5.9.6 and later the OCaml sections of the [http://plplot.sourceforge.net/documentation.php PLplot documentation] includes a tutorial which introduces each of these modules.  This tutorial is meant to expand on that material and allow for a simpler process for contributing improvements.&lt;br /&gt;
&lt;br /&gt;
== Using the Quick_plot module ==&lt;br /&gt;
&lt;br /&gt;
The main OCaml PLplot module is meant to be open&amp;#039;d:&lt;br /&gt;
&lt;br /&gt;
  open Plplot&lt;br /&gt;
&lt;br /&gt;
From here, one can try out a quick plot of sin and cos:&lt;br /&gt;
&lt;br /&gt;
  Quick_plot.func [sin; cos] (-3.14, 3.14)&lt;br /&gt;
&lt;br /&gt;
which gives output which looks something like this:&lt;br /&gt;
&lt;br /&gt;
[[File:quick_plot_bare.png]]&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s great, but it would be even better if there were labels so that we know what the axes mean and a legend to show which line corresponds with which function. We can do that:&lt;br /&gt;
&lt;br /&gt;
  Quick_plot.func&lt;br /&gt;
    ~labels:(&amp;quot;Angle (radians)&amp;quot;, &amp;quot;Amplitude&amp;quot;, &amp;quot;A few functions&amp;quot;)&lt;br /&gt;
    ~names:[&amp;quot;sin&amp;quot;; &amp;quot;cos&amp;quot;]&lt;br /&gt;
    [sin; cos] (-3.14, 3.14)&lt;br /&gt;
&lt;br /&gt;
with output which looks something like this:&lt;br /&gt;
&lt;br /&gt;
[[File:quick_plot_labels.png]]&lt;br /&gt;
&lt;br /&gt;
Much better, and much easier to interpret!&lt;/div&gt;</summary>
		<author><name>Hcarty</name></author>	</entry>

	</feed>