<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>word &#8211; Gnuplotting</title>
	<atom:link href="./index.html?simply_static_page=2108" rel="self" type="application/rss+xml" />
	<link>./../../../index.html</link>
	<description>Create scientific plots using gnuplot</description>
	<lastBuildDate>Sun, 17 Feb 2013 19:16:24 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.1.1</generator>
	<item>
		<title>Spectrogram</title>
		<link>./../../../spectrogram/index.html</link>
					<comments>./../../../spectrogram/index.html#comments</comments>
		
		<dc:creator><![CDATA[hagen]]></dc:creator>
		<pubDate>Tue, 29 Nov 2011 17:07:22 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[colormap]]></category>
		<category><![CDATA[for]]></category>
		<category><![CDATA[iteration]]></category>
		<category><![CDATA[label]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[margin]]></category>
		<category><![CDATA[matrix]]></category>
		<category><![CDATA[word]]></category>
		<guid isPermaLink="false">./../../../index.html?p=441</guid>

					<description><![CDATA[A spectrogram is a time-frequency representation that shows how the spectral content of a signal varies with time. In Fig. 1 the spectrogram of the German sentence &#8220;Achte auf die Autos&#8221; is shown. Fig. 1 Spectrogram plotted with plot (code to produce this figure, data) The spectrogram is plotted as mentioned in the color maps [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>A spectrogram is a time-frequency representation that shows how the spectral content of a signal varies with time. In Fig. 1 the spectrogram of the German sentence &#8220;Achte auf die Autos&#8221; is shown.</p>
<div class="figure" style="width:420px;">
    <img decoding="async" src="./../../../figs/spec1.png" alt="Spectrogram" width="410"/></p>
<p class="caption">
        <strong>Fig. 1 </strong>Spectrogram plotted with plot (<a href="./../../../code/spec1.gnu" type="text/plain">code to produce this figure</a>, <a href="./../../../data/spec.dat" type="text/plain">data</a>)
    </p>
</div>
<p>The spectrogram is plotted as mentioned in the <a href="./../../../color-maps-and-the-scale-of-axes/index.html">color maps entry</a>.</p>
<pre class="prettyprint">
plot 'spec.dat' binary matrix with image
</pre>
<p>In addition the letters were putted on the graph at their corresponding time of occurrence. The letters itself and their positions are stored in the two lists <code>syl</code> and <code>xpos</code>. In order to access the single entries of these lists within a for loop the function <code>word</code> is needed.</p>
<pre class="prettyprint">
<span class="C"># Adding the syllables</span>
<span class="v">syl</span>  <span class="o">=</span> <span class="s">'A    ch   te   a    u    f    d    ie   A    u    t    \
o    s   '</span>
<span class="v">xpos</span> <span class="o">=</span> <span class="s">'0.15 0.22 0.36 0.44 0.49 0.56 0.62 0.66 0.89 1.01 1.16 \
1.26 1.42'</span>
<span class="k">set</span> <span class="k">for</span> [<span class="v">n</span><span class="o">=</span><span class="n">1</span><span class="o">:</span><span class="f">words</span>(<span class="v">syl</span>)] label <span class="f">word</span>(<span class="v">syl</span>,<span class="v">n</span>) at <span class="f">word</span>(<span class="v">xpos</span>,<span class="v">n</span>),<span class="n">6800</span>
</pre>
<p>Another way to plot the spectrogram is by using <code>splot</code> which will result in a different kind of smoothing algorithm of the spectrogram, as can be seen in Fig. 2.</p>
<div class="figure" style="width:420px;">
    <img decoding="async" src="./../../../figs/spec2.png" alt="Spectrogram" width="410"/></p>
<p class="caption">
        <strong>Fig. 2 </strong>Spectrogram plotted with splot (<a href="./../../../code/spec2.gnu" type="text/plain">code to produce this figure</a>, <a href="./../../../data/spec.dat" type="text/plain">data</a>)
    </p>
</div>
<p>But to get this result we have to fix some of the margins, because <code>plot</code> is two-dimensinal and <code>splot</code> is three-dimensional which is not desired here.</p>
<pre class="prettyprint">
<span class="k">set</span> border <span class="n">10</span> front ls <span class="n">11</span>
<span class="k">set</span> tmargin at screen <span class="n">0.75</span>
<span class="k">set</span> bmargin at screen <span class="n">0.25</span>
<span class="k">set</span> rmargin at screen <span class="n">0.95</span>
<span class="k">set</span> lmargin at screen <span class="n">0.15</span>
</pre>
]]></content:encoded>
					
					<wfw:commentRss>./../../../spectrogram/feed/index.html</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
