<?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>Ionut's WebSpace &#187; Gnuplot</title>
	<atom:link href="http://www.vioan.ro/wp/category/gnuplot/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vioan.ro/wp</link>
	<description>Exploring Creativity Is My Passion</description>
	<lastBuildDate>Sun, 08 Aug 2010 21:09:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Software I am using &#8230;</title>
		<link>http://www.vioan.ro/wp/2008/11/15/software-i-am-using/</link>
		<comments>http://www.vioan.ro/wp/2008/11/15/software-i-am-using/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 23:57:30 +0000</pubDate>
		<dc:creator>ionut</dc:creator>
				<category><![CDATA[*BSD]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Gnuplot]]></category>
		<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MacOS]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[SciComputing]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[workstation]]></category>

		<guid isPermaLink="false">http://www.vioan.ro/wp/?p=275</guid>
		<description><![CDATA[


If you would like to see what software I am using on my desktop, laptop, workstation (Windows, Linux, Unix) in order to get my research/scientific work done, or if you want to know what software I am installing on my servers for customers, check this section of my website.
]]></description>
			<content:encoded><![CDATA[<p>If you would like to see what software I am using on my desktop, laptop, workstation (Windows, Linux, Unix) in order to get my research/scientific work done, or if you want to know what software I am installing on my servers for customers, check <a href="http://www.vioan.ro/wp/otherstuff/">this section of my website</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vioan.ro/wp/2008/11/15/software-i-am-using/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Scientific Software</title>
		<link>http://www.vioan.ro/wp/2008/11/14/scientific-software/</link>
		<comments>http://www.vioan.ro/wp/2008/11/14/scientific-software/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 15:41:13 +0000</pubDate>
		<dc:creator>ionut</dc:creator>
				<category><![CDATA[*BSD]]></category>
		<category><![CDATA[Gnuplot]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SciComputing]]></category>
		<category><![CDATA[numerical]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[scientific computing]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://www.vioan.ro/wp/?p=256</guid>
		<description><![CDATA[If you are working in Scientific Computing, like me, then the next links are for you:

Free Software :: Scientific Software
Graphics Software
Numerical Analysis Software
Scientific/Engineering Software @SourceForge.net
Scientific/Engineering  Software @Freshmeat.net
Wiki du laboratoire MAS
Applications @Ubuntu
Applications @OpenSUSE

]]></description>
			<content:encoded><![CDATA[<p>If you are working in Scientific Computing, like me, then the next links are for you:</p>
<ul>
<li><a href="http://wikicompany.org/fs/science.html">Free Software :: Scientific Software</a></li>
<li><a href="http://en.wikipedia.org/wiki/List_of_graphing_software">Graphics Software</a></li>
<li><a href="http://en.wikipedia.org/wiki/List_of_numerical_analysis_software">Numerical Analysis Software</a></li>
<li><a href="http://sourceforge.net/softwaremap/trove_list.php?form_cat=97">Scientific/Engineering Software @SourceForge.net</a></li>
<li><a href="http://freshmeat.net/browse/97/?hash=d09a5de78aa25b4f6b32fd2796bbe363&amp;offset=0">Scientific/Engineering  Software @Freshmeat.net</a></li>
<li><a href="http://norma.mas.ecp.fr/wikimas/ScientificComputingSoftware">Wiki du laboratoire MAS</a></li>
<li><a href="https://help.ubuntu.com/community/UbuntuScience">Applications @Ubuntu</a></li>
<li><a href="http://en.opensuse.org/List_of_Scientific_Applications">Applications @OpenSUSE</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.vioan.ro/wp/2008/11/14/scientific-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calling Gnuplot from Perl</title>
		<link>http://www.vioan.ro/wp/2008/09/30/calling-gnuplot-from-perl/</link>
		<comments>http://www.vioan.ro/wp/2008/09/30/calling-gnuplot-from-perl/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 21:18:31 +0000</pubDate>
		<dc:creator>ionut</dc:creator>
				<category><![CDATA[Gnuplot]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[SciComputing]]></category>
		<category><![CDATA[scientific]]></category>

		<guid isPermaLink="false">http://www.vioan.ro/wp/?p=163</guid>
		<description><![CDATA[In my previous post I discussed how to call Gnuplot from C and Python language. If you are using Perl, then, here is the script:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/perl
# Generate postscript and png plot with GNUplot from Perl
# Author: Ioan Vancea
# Usage: Give &#34;data file&#34; as an argument for script
&#160;
use strict;
use warnings;
&#160;
my $file = ARGV&#91;0&#93;;
&#160;
# POSTSCRIPT
open &#40;GNUPLOT, &#34;&#124;gnuplot&#34;&#41;;
print GNUPLOT [...]]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.vioan.ro/wp/2008/09/30/graphics-with-gnuplot-from-c-and-python-language/">my previous post</a> I discussed how to call Gnuplot from C and Python language. If you are using Perl, then, here is the script:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
</pre></td><td class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span>
<span style="color: #666666; font-style: italic;"># Generate postscript and png plot with GNUplot from Perl</span>
<span style="color: #666666; font-style: italic;"># Author: Ioan Vancea</span>
<span style="color: #666666; font-style: italic;"># Usage: Give &quot;data file&quot; as an argument for script</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> warnings<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$file</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">ARGV</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># POSTSCRIPT</span>
<span style="color: #000066;">open</span> <span style="color: #009900;">&#40;</span>GNUPLOT<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;|gnuplot&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> GNUPLOT <span style="color: #cc0000; font-style: italic;">&lt;&lt;EOPLOT;
set term post color &quot;Courier&quot; 12
set output &quot;$file.ps&quot;
set size 1 ,1
set nokey
set data style line
set xlabel &quot;frequency&quot; font &quot;Courier,14&quot;
set title &quot;Fast Fourier Transform&quot; font &quot;Courier,14&quot;
set grid xtics ytics
set xtics 100
plot &quot;$file&quot; using 1:2 w lines 1
EOPLOT</span>
<span style="color: #000066;">close</span><span style="color: #009900;">&#40;</span>GNUPLOT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># PNG</span>
<span style="color: #000066;">open</span> <span style="color: #009900;">&#40;</span>GNUPLOT<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;|gnuplot&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">print</span> GNUPLOT <span style="color: #cc0000; font-style: italic;">&lt;&lt;EOPLOT;
set term png small xFFFFFF
set output &quot;$file.png&quot;
set size 1 ,1
set nokey
set data style line
set xlabel &quot;frequency&quot; font &quot;VeraMono,10&quot;
set title &quot;Fast Fourier Transform&quot; font &quot;VeraMono,10&quot;
set grid xtics ytics
set xtics 100
plot &quot;$file&quot; using 1:2 w lines 1
EOPLOT</span>
<span style="color: #000066;">close</span><span style="color: #009900;">&#40;</span>GNUPLOT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.vioan.ro/wp/2008/09/30/calling-gnuplot-from-perl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Graphics with Gnuplot from C and Python language</title>
		<link>http://www.vioan.ro/wp/2008/09/30/graphics-with-gnuplot-from-c-and-python-language/</link>
		<comments>http://www.vioan.ro/wp/2008/09/30/graphics-with-gnuplot-from-c-and-python-language/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 19:41:31 +0000</pubDate>
		<dc:creator>ionut</dc:creator>
				<category><![CDATA[Gnuplot]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[SciComputing]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[scientific]]></category>

		<guid isPermaLink="false">http://www.vioan.ro/wp/?p=159</guid>
		<description><![CDATA[If you are doing a lot of calculations/simulations, like me, using C or/and Python language, you also need to visualize your simulated data. One way to do it is just to generate/write a &#8220;data&#8221; file and plot it with your plotting preferred package after the simulation is finished. But maybe, sometimes, you want to see [...]]]></description>
			<content:encoded><![CDATA[<p>If you are doing a lot of calculations/simulations, like me, using C or/and Python language, you also need to visualize your simulated data. One way to do it is just to generate/write a &#8220;data&#8221; file and plot it with your plotting preferred package after the simulation is finished. But maybe, sometimes, you want to see the graph in real time, so, here I would like to show a small C and Python program which calls Gnuplot and save the plot in png format.</p>
<p><strong>C Example</strong>:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="c" style="font-family:monospace;"><span style="color: #339933;">#include&lt;stdio.h&gt;</span>
<span style="color: #808080; font-style: italic;">/*
	Author: Ioan Vancea (www.vioan.ro)
	*****************************/</span>
<span style="color: #993333;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	FILE <span style="color: #339933;">*</span>pipe <span style="color: #339933;">=</span> popen<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;gnuplot -persist&quot;</span><span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;w&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	fprintf<span style="color: #009900;">&#40;</span>pipe<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;set samples 40<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	fprintf<span style="color: #009900;">&#40;</span>pipe<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;set isosamples 40<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	fprintf<span style="color: #009900;">&#40;</span>pipe<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;set hidden3d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	fprintf<span style="color: #009900;">&#40;</span>pipe<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;set xrange [-8.000:8.000]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	fprintf<span style="color: #009900;">&#40;</span>pipe<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;set yrange [-8.000:8.000]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	fprintf<span style="color: #009900;">&#40;</span>pipe<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;set zrange [-2.000:2.000]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	fprintf<span style="color: #009900;">&#40;</span>pipe<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;set terminal png<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	fprintf<span style="color: #009900;">&#40;</span>pipe<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;set output 'graph.png'<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	fprintf<span style="color: #009900;">&#40;</span>pipe<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;set title 'We are plotting from C'<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	fprintf<span style="color: #009900;">&#40;</span>pipe<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;set xlabel 'Label X'<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	fprintf<span style="color: #009900;">&#40;</span>pipe<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;set ylabel 'Label Y'<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #808080; font-style: italic;">/* fprintf(pipe, &quot;plot 'datafile.dat' using 1:2\n&quot;);*/</span>
	fprintf<span style="color: #009900;">&#40;</span>pipe<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;splot cos(x)+cos(y)<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
  close<span style="color: #009900;">&#40;</span>pipe<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #b1b100;">return</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The output:</p>
<p><a href="http://www.vioan.ro/wp/wp-content/uploads/2008/09/graph.png"><img class="aligncenter size-medium wp-image-160" title="graph" src="http://www.vioan.ro/wp/wp-content/uploads/2008/09/graph-300x225.png" alt="" width="300" height="225" /></a></p>
<p><strong>Python</strong> <strong>Example</strong> (I use <a href="http://gnuplot-py.sourceforge.net/">Gnuplot.py</a>):</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="python" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">#!/usr/bin/env python</span>
&nbsp;
<span style="color: #483d8b;">''</span><span style="color: #483d8b;">'
	Author: Ioan Vancea (www.vioan.ro)
'</span><span style="color: #483d8b;">''</span>
&nbsp;
<span style="color: #ff7700;font-weight:bold;">import</span> <span style="color: #dc143c;">math</span>
<span style="color: #ff7700;font-weight:bold;">import</span> Gnuplot
gp = Gnuplot.<span style="color: black;">Gnuplot</span><span style="color: black;">&#40;</span>persist=<span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span>
x = <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">1000</span><span style="color: black;">&#41;</span>
y = <span style="color: black;">&#91;</span><span style="color: #dc143c;">math</span>.<span style="color: black;">sin</span><span style="color: black;">&#40;</span>a<span style="color: black;">&#41;</span> + <span style="color: #dc143c;">math</span>.<span style="color: black;">cos</span><span style="color: black;">&#40;</span>a<span style="color: black;">&#41;</span> + <span style="color: #dc143c;">math</span>.<span style="color: black;">tan</span><span style="color: black;">&#40;</span>a<span style="color: black;">&#41;</span> <span style="color: #ff7700;font-weight:bold;">for</span> a <span style="color: #ff7700;font-weight:bold;">in</span> x<span style="color: black;">&#93;</span>
data = Gnuplot.<span style="color: black;">Data</span><span style="color: black;">&#40;</span>x, y, title=<span style="color: #483d8b;">'Plotting from Python'</span><span style="color: black;">&#41;</span>
gp<span style="color: black;">&#40;</span><span style="color: #483d8b;">'set data style lines'</span><span style="color: black;">&#41;</span>
gp<span style="color: black;">&#40;</span><span style="color: #483d8b;">'set xlabel &quot;Label x&quot;'</span><span style="color: black;">&#41;</span>
gp<span style="color: black;">&#40;</span><span style="color: #483d8b;">'set ylabel &quot;Label y&quot;'</span><span style="color: black;">&#41;</span>
gp.<span style="color: black;">plot</span><span style="color: black;">&#40;</span>data<span style="color: black;">&#41;</span><span style="color: #66cc66;">;</span>
gp.<span style="color: black;">hardcopy</span><span style="color: black;">&#40;</span>filename=<span style="color: #483d8b;">&quot;pyplot.png&quot;</span>,terminal=<span style="color: #483d8b;">&quot;png&quot;</span><span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p>The output:</p>
<p><a href="http://www.vioan.ro/wp/wp-content/uploads/2008/09/pyplot.png"><img class="aligncenter size-medium wp-image-161" title="pyplot" src="http://www.vioan.ro/wp/wp-content/uploads/2008/09/pyplot-300x225.png" alt="" width="300" height="225" /></a></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.vioan.ro/wp/2008/09/30/graphics-with-gnuplot-from-c-and-python-language/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
