<?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>from the desk of stinkpot</title>
	<atom:link href="http://desk.stinkpot.org/tricks/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://desk.stinkpot.org:8080/tricks</link>
	<description>tricks!</description>
	<lastBuildDate>Thu, 02 Feb 2012 03:41:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>hide tick lines in matplotlib</title>
		<link>http://desk.stinkpot.org:8080/tricks/index.php/2012/02/hide-tick-lines-in-matplotlib/</link>
		<comments>http://desk.stinkpot.org:8080/tricks/index.php/2012/02/hide-tick-lines-in-matplotlib/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 03:41:49 +0000</pubDate>
		<dc:creator>Lawrence David</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://desk.stinkpot.org:8080/tricks/?p=425</guid>
		<description><![CDATA[to hide the tick lines in matplotlib: xaxis = ax.xaxis xaxis.set_ticks_position(&#8216;none&#8217;)]]></description>
			<content:encoded><![CDATA[<p>to hide the tick lines in matplotlib:</p>
<blockquote><p>xaxis = ax.xaxis</p>
<p>xaxis.set_ticks_position(&#8216;none&#8217;)</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://desk.stinkpot.org:8080/tricks/index.php/2012/02/hide-tick-lines-in-matplotlib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>horizontal grid lines in matplotlib</title>
		<link>http://desk.stinkpot.org:8080/tricks/index.php/2012/02/horizontal-grid-lines-in-matplotlib/</link>
		<comments>http://desk.stinkpot.org:8080/tricks/index.php/2012/02/horizontal-grid-lines-in-matplotlib/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 01:20:23 +0000</pubDate>
		<dc:creator>Lawrence David</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://desk.stinkpot.org:8080/tricks/?p=423</guid>
		<description><![CDATA[to create only horizontal grid lines in matplotlib: fig, ax = pylab.subplots(1) ax.xaxis.grid(True) pylab.grid()]]></description>
			<content:encoded><![CDATA[<p>to create only horizontal grid lines in matplotlib:</p>
<blockquote><p>fig, ax = pylab.subplots(1)</p>
<p>ax.xaxis.grid(True)</p>
<p>pylab.grid()</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://desk.stinkpot.org:8080/tricks/index.php/2012/02/horizontal-grid-lines-in-matplotlib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>label x-axis with strings, instead of numbers, in matplotlib</title>
		<link>http://desk.stinkpot.org:8080/tricks/index.php/2012/01/label-x-axis-with-strings-instead-of-numbers-in-matplotlib/</link>
		<comments>http://desk.stinkpot.org:8080/tricks/index.php/2012/01/label-x-axis-with-strings-instead-of-numbers-in-matplotlib/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 16:14:57 +0000</pubDate>
		<dc:creator>Lawrence David</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://desk.stinkpot.org:8080/tricks/?p=421</guid>
		<description><![CDATA[let&#8217;s say you&#8217;ve made a bar plot and you want to label the bars by strings (e.g. &#8216;A&#8217;, &#8216;B&#8217;) instead of the default number range.  to do with a list of labels named &#8216;bar_l&#8217;: import pylab as pl pl.xticks(np.arange(len(bar_l)),bar_l,rotation=45)]]></description>
			<content:encoded><![CDATA[<p>let&#8217;s say you&#8217;ve made a bar plot and you want to label the bars by strings (e.g. &#8216;A&#8217;, &#8216;B&#8217;) instead of the default number range.  to do with a list of labels named &#8216;bar_l&#8217;:</p>
<blockquote><p>import pylab as pl</p>
<p>pl.xticks(np.arange(len(bar_l)),bar_l,rotation=45)</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://desk.stinkpot.org:8080/tricks/index.php/2012/01/label-x-axis-with-strings-instead-of-numbers-in-matplotlib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>change default line color order in matplotlib</title>
		<link>http://desk.stinkpot.org:8080/tricks/index.php/2011/09/change-default-line-color-order-in-matplotlib/</link>
		<comments>http://desk.stinkpot.org:8080/tricks/index.php/2011/09/change-default-line-color-order-in-matplotlib/#comments</comments>
		<pubDate>Thu, 29 Sep 2011 03:07:27 +0000</pubDate>
		<dc:creator>Lawrence David</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://desk.stinkpot.org:8080/tricks/?p=417</guid>
		<description><![CDATA[to change the default line color order (color cycle in matplotlib-speak): ax.set_color_cycle(['green', 'orange', 'blue', 'red','brown','pink']) note that this will also go ahead and reset the line counter.]]></description>
			<content:encoded><![CDATA[<p>to change the default line color order (color cycle in matplotlib-speak):</p>
<blockquote><p>ax.set_color_cycle(['green', 'orange', 'blue', 'red','brown','pink'])</p></blockquote>
<p>note that this will also go ahead and reset the line counter.</p>
]]></content:encoded>
			<wfw:commentRss>http://desk.stinkpot.org:8080/tricks/index.php/2011/09/change-default-line-color-order-in-matplotlib/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>draw fill_between matplotlib plot with nans</title>
		<link>http://desk.stinkpot.org:8080/tricks/index.php/2011/09/draw-fill_between-matplotlib-plot-with-nans/</link>
		<comments>http://desk.stinkpot.org:8080/tricks/index.php/2011/09/draw-fill_between-matplotlib-plot-with-nans/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 20:05:59 +0000</pubDate>
		<dc:creator>Lawrence David</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://desk.stinkpot.org:8080/tricks/?p=415</guid>
		<description><![CDATA[nan&#8217;s cause problems with the fill_between plots in matplotlib. to fix, use the &#8220;where&#8221; input argument: fig, ax = pl.subplots(1) ax.fill_between(x_v,0,y_v,where=np.isfinite(y_v))]]></description>
			<content:encoded><![CDATA[<p>nan&#8217;s cause problems with the fill_between plots in matplotlib.</p>
<p>to fix, use the &#8220;where&#8221; input argument:</p>
<blockquote><p>fig, ax = pl.subplots(1)</p>
<p>ax.fill_between(x_v,0,y_v,where=np.isfinite(y_v))</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://desk.stinkpot.org:8080/tricks/index.php/2011/09/draw-fill_between-matplotlib-plot-with-nans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>insert a tab using sed</title>
		<link>http://desk.stinkpot.org:8080/tricks/index.php/2011/09/insert-a-tab-using-sed/</link>
		<comments>http://desk.stinkpot.org:8080/tricks/index.php/2011/09/insert-a-tab-using-sed/#comments</comments>
		<pubDate>Mon, 12 Sep 2011 18:41:14 +0000</pubDate>
		<dc:creator>Lawrence David</dc:creator>
				<category><![CDATA[Shell Scripting]]></category>

		<guid isPermaLink="false">http://desk.stinkpot.org:8080/tricks/?p=412</guid>
		<description><![CDATA[if you find that sed isn&#8217;t matching \t, the easiest workaround is to not use sed at all. instead, install &#8216;gsed&#8217;, which can handle tabs.]]></description>
			<content:encoded><![CDATA[<p>if you find that sed isn&#8217;t matching \t, the easiest workaround is to not use sed at all.</p>
<p>instead, install &#8216;gsed&#8217;, which can handle tabs.</p>
]]></content:encoded>
			<wfw:commentRss>http://desk.stinkpot.org:8080/tricks/index.php/2011/09/insert-a-tab-using-sed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hide upper ticks in matplotlib figure</title>
		<link>http://desk.stinkpot.org:8080/tricks/index.php/2011/08/hide-upper-ticks-in-matplotlib-figure/</link>
		<comments>http://desk.stinkpot.org:8080/tricks/index.php/2011/08/hide-upper-ticks-in-matplotlib-figure/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 17:59:59 +0000</pubDate>
		<dc:creator>Lawrence David</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://desk.stinkpot.org:8080/tricks/?p=409</guid>
		<description><![CDATA[to only show the bottom ticks in a matplotlib figure: axis_x = ax.xaxis axis_x.tick_bottom() &#160;]]></description>
			<content:encoded><![CDATA[<p>to only show the bottom ticks in a matplotlib figure:</p>
<blockquote><p>axis_x = ax.xaxis</p>
<p>axis_x.tick_bottom()</p></blockquote>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://desk.stinkpot.org:8080/tricks/index.php/2011/08/hide-upper-ticks-in-matplotlib-figure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>get pairwise combinations of a list&#8217;s items in python</title>
		<link>http://desk.stinkpot.org:8080/tricks/index.php/2011/08/get-pairwise-combinations-of-a-lists-items-in-python/</link>
		<comments>http://desk.stinkpot.org:8080/tricks/index.php/2011/08/get-pairwise-combinations-of-a-lists-items-in-python/#comments</comments>
		<pubDate>Mon, 08 Aug 2011 15:41:28 +0000</pubDate>
		<dc:creator>Lawrence David</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://desk.stinkpot.org:8080/tricks/?p=407</guid>
		<description><![CDATA[use the itertools and random modules in python to get N pairwise combinations of a list&#8217;s items: combo_it = itertools.combinations(my_list,2) combo_l = list(combo_it) random.shuffle(combo_l) pair_l = combo_l[:N]]]></description>
			<content:encoded><![CDATA[<p>use the itertools and random modules in python to get N pairwise combinations of a list&#8217;s items:</p>
<blockquote><p>combo_it = itertools.combinations(my_list,2)<br />
combo_l = list(combo_it)<br />
random.shuffle(combo_l)<br />
pair_l = combo_l[:N]</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://desk.stinkpot.org:8080/tricks/index.php/2011/08/get-pairwise-combinations-of-a-lists-items-in-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fix sudo ownership in mac os x</title>
		<link>http://desk.stinkpot.org:8080/tricks/index.php/2011/08/fix-sudo-ownership-in-mac-os-x/</link>
		<comments>http://desk.stinkpot.org:8080/tricks/index.php/2011/08/fix-sudo-ownership-in-mac-os-x/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 19:55:09 +0000</pubDate>
		<dc:creator>Lawrence David</dc:creator>
				<category><![CDATA[Mac OS X]]></category>

		<guid isPermaLink="false">http://desk.stinkpot.org:8080/tricks/?p=404</guid>
		<description><![CDATA[using sudo was giving me the warning: sudo: /var/db/sudo owned by uid 501, should be uid 0 to fix: iMac://usr/bin/sudo chown -R root /private/var/db/sudo]]></description>
			<content:encoded><![CDATA[<p>using sudo was giving me the warning:</p>
<blockquote><p>sudo: /var/db/sudo owned by uid 501, should be uid 0</p></blockquote>
<p>to fix:</p>
<blockquote><p>iMac://usr/bin/sudo chown -R root /private/var/db/sudo</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://desk.stinkpot.org:8080/tricks/index.php/2011/08/fix-sudo-ownership-in-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>resolve &#8220;Nothing can be done for the type&#8221; errors when using rpy2</title>
		<link>http://desk.stinkpot.org:8080/tricks/index.php/2011/08/resolve-nothing-can-be-done-for-the-type-errors-when-using-rpy2/</link>
		<comments>http://desk.stinkpot.org:8080/tricks/index.php/2011/08/resolve-nothing-can-be-done-for-the-type-errors-when-using-rpy2/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 17:51:21 +0000</pubDate>
		<dc:creator>Lawrence David</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[R]]></category>

		<guid isPermaLink="false">http://desk.stinkpot.org:8080/tricks/?p=402</guid>
		<description><![CDATA[Importing arrays from numpy to rpy2 can throw the following error: ValueError: Nothing can be done for the type &#60;type &#8216;numpy.ndarray&#8217;&#62; at the moment. To resolve, add the following to the top of your Python code: import rpy2.robjects.numpy2ri rpy2.robjects.numpy2ri.activate()]]></description>
			<content:encoded><![CDATA[<p>Importing arrays from numpy to rpy2 can throw the following error:</p>
<blockquote><p>ValueError: Nothing can be done for the type &lt;type &#8216;numpy.ndarray&#8217;&gt; at the moment.</p></blockquote>
<p>To resolve, add the following to the top of your Python code:</p>
<blockquote><p>import rpy2.robjects.numpy2ri</p>
<p>rpy2.robjects.numpy2ri.activate()</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://desk.stinkpot.org:8080/tricks/index.php/2011/08/resolve-nothing-can-be-done-for-the-type-errors-when-using-rpy2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

