<?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>goodmami.org &#187; Uncategorized</title>
	<atom:link href="http://www.goodmami.org/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.goodmami.org</link>
	<description>Homepage of Michael Wayne Goodman, student of computational linguistics at the University of Washington</description>
	<lastBuildDate>Sat, 04 Feb 2012 23:25:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Latex, Python, and CairoPlot</title>
		<link>http://www.goodmami.org/2009/03/latex-python-and-cairoplot/</link>
		<comments>http://www.goodmami.org/2009/03/latex-python-and-cairoplot/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 05:54:40 +0000</pubDate>
		<dc:creator>goodmami</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.goodmami.org/?p=22</guid>
		<description><![CDATA[CairoPlot is a Python module that uses the Cairo graphics package to produce great-looking charts easily. The results look really nice and are much simpler to create than many other packages, but up until now it has been suboptimal for use with LaTeX documents. I&#8217;ve been talking with the package maintainer and filing bugs about [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://linil.wordpress.com/2008/09/16/cairoplot-11/">CairoPlot</a> is a Python module that uses the <a href="http://cairographics.org/">Cairo</a> graphics package to produce great-looking charts easily. The results look really nice and are much simpler to create than many other packages, but up until now it has been suboptimal for use with LaTeX documents. I&#8217;ve been talking with the package maintainer and filing bugs about these inadequacies, and my concerns were quickly addressed. See the <a href="http://launchpad.net/cairoplot">CairoPlot Launchpad page</a> to view the bugs filed against it.</p>
<p>I also recently found a blog post about <a href="http://www.imada.sdu.dk/~ehmsen/pythonlatex.php">embedding python in LaTeX files</a> [UPDATE: post appears to have gone offline. <a href="http://goodmami.org/files/python.sty">Here is a backup copy</a> of python.sty, thanks to <a href="http://www.stevecheckley.co.uk/blog/2011/06/16/cairoplot/">Steve Checkley</a>]. Using this with CairoPlot, it is easy to put the chart-producing code directly in my .tex files and compile. This reduces the extra step of making separate python scripts to produce these charts. Here is some sample code from a paper I&#8217;m currently writing:</p>
<div class="codecolorer-container python railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br /></div></td><td><div class="python codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">\begin<span style="color: black;">&#123;</span>python<span style="color: black;">&#125;</span><br />
<span style="color: #ff7700;font-weight:bold;">import</span> cairoplot<br />
cairoplot.<span style="color: black;">vertical_bar_plot</span><span style="color: black;">&#40;</span><br />
&nbsp; <span style="color: #483d8b;">'dat/initial-grammar-stats.ps'</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: black;">&#91;</span> <span style="color: black;">&#91;</span><span style="color: #ff4500;">0.87</span><span style="color: #66cc66;">,</span> <span style="color: #ff4500;">0.82</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span> <span style="color: black;">&#91;</span><span style="color: #ff4500;">0.83</span><span style="color: #66cc66;">,</span> <span style="color: #ff4500;">0.50</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span> <span style="color: black;">&#91;</span><span style="color: #ff4500;">0.70</span><span style="color: #66cc66;">,</span> <span style="color: #ff4500;">0.11</span><span style="color: black;">&#93;</span> <span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span><br />
&nbsp; <span style="color: #ff4500;">340</span><span style="color: #66cc66;">,</span> <span style="color: #ff4500;">280</span><span style="color: #66cc66;">,</span> background <span style="color: #66cc66;">=</span> <span style="color: #008000;">None</span><span style="color: #66cc66;">,</span> border <span style="color: #66cc66;">=</span> <span style="color: #ff4500;">10</span><span style="color: #66cc66;">,</span> grid <span style="color: #66cc66;">=</span> <span style="color: #008000;">True</span><span style="color: #66cc66;">,</span><br />
&nbsp; x_labels <span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><span style="color: #483d8b;">'Parses'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'Generates'</span><span style="color: #66cc66;">,</span> <span style="color: #483d8b;">'Generates Original'</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span><br />
&nbsp; y_labels <span style="color: #66cc66;">=</span> <span style="color: black;">&#91;</span><span style="color: #483d8b;">'%d%%'</span> % i <span style="color: #ff7700;font-weight:bold;">for</span> i <span style="color: #ff7700;font-weight:bold;">in</span> <span style="color: #008000;">range</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span><span style="color: #66cc66;">,</span><span style="color: #ff4500;">110</span><span style="color: #66cc66;">,</span><span style="color: #ff4500;">10</span><span style="color: black;">&#41;</span><span style="color: black;">&#93;</span><span style="color: #66cc66;">,</span><br />
&nbsp; y_bounds <span style="color: #66cc66;">=</span> <span style="color: black;">&#40;</span><span style="color: #ff4500;">0</span><span style="color: #66cc66;">,</span><span style="color: #ff4500;">1</span><span style="color: black;">&#41;</span> <span style="color: black;">&#41;</span><br />
<span style="color: #ff7700;font-weight:bold;">print</span><span style="color: black;">&#40;</span>r<span style="color: #483d8b;">'<span style="color: #000099; font-weight: bold;">\i</span>ncludegraphics{dat/initial-grammar-stats.ps}'</span><span style="color: black;">&#41;</span><br />
\end<span style="color: black;">&#123;</span>python<span style="color: black;">&#125;</span></div></td></tr></tbody></table></div>
<p>I do have some gripes about python.sty, though. I have to remember to use the latex command with the &#8220;&#8211;shell-escape&#8221; option. Also, it produces files for the python code, stderr and stdout output, and I don&#8217;t particularly care for the directory getting cluttered up with temporary files. Because of these annoyances, I might forgo the python.sty method and just keep a python script that generates all the charts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodmami.org/2009/03/latex-python-and-cairoplot/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>goodmami.org</title>
		<link>http://www.goodmami.org/2009/03/goodmamiorg/</link>
		<comments>http://www.goodmami.org/2009/03/goodmamiorg/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 09:46:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.goodmami.org/?p=9</guid>
		<description><![CDATA[Homepage of Michael Wayne Goodman, computational linguist at the University of Washington.]]></description>
			<content:encoded><![CDATA[<div class="wp-caption alignnone" style="width: 512px"><a href="http://www.flickr.com/photos/goodmami/3097527896/"><img title="colors of autumn" src="http://farm4.static.flickr.com/3091/3097527896_65c01abdef.jpg" alt="Orange, red, and yellow maple leaves fallen to the stone walkway at a temple in Fukuoka" width="502" height="282" /></a><p class="wp-caption-text">Orange, red, and yellow maple leaves fallen to the stone walkway at a temple in Fukuoka</p></div>
<p>Homepage of Michael Wayne Goodman, computational linguist at the University of Washington.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.goodmami.org/2009/03/goodmamiorg/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

