<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Levi's Silly Blog - Bug Fixes etc.</title>
    <link>http://levikilcher.com/serendipity/</link>
    <description></description>
    <dc:language>en</dc:language>
    <generator>Serendipity 1.0.2 - http://www.s9y.org/</generator>
    
    

<item>
    <title>matplotlib, pcolor, pcolormesh, masked arrays and the black background</title>
    <link>http://levikilcher.com/serendipity/index.php?/archives/80-matplotlib,-pcolor,-pcolormesh,-masked-arrays-and-the-black-background.html</link>
            <category>Bug Fixes etc.</category>
            <category>Work</category>
    
    <comments>http://levikilcher.com/serendipity/index.php?/archives/80-matplotlib,-pcolor,-pcolormesh,-masked-arrays-and-the-black-background.html#comments</comments>
    <wfw:comment>http://levikilcher.com/serendipity/wfwcomment.php?cid=80</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://levikilcher.com/serendipity/rss.php?version=2.0&amp;type=comments&amp;cid=80</wfw:commentRss>
    

    <author>nospam@example.com (Levi Kilcher)</author>
    <content:encoded>
    So for anyone out there who has been having pcolor&#039;ing masked arrays in matplotlib, such that the masked regions are actually black, I found the fix &lt;a href=&quot;http://sourceforge.net/tracker/index.php?func=detail&amp;aid=2900443&amp;group_id=80706&amp;atid=560720&quot; &gt;here&lt;/a&gt; (check the comments).&lt;br /&gt;
&lt;br /&gt;
Apparently this has been fixed in the upstream versions, but it hasn&#039;t been sent down to the latest version of matplotlib packaged with ubuntu (I&#039;m using karmic).&lt;br /&gt;
&lt;br /&gt;
Basically, the fix goes like this:&lt;br /&gt;
Change line 491 in /usr/share/pyshared/matplotlib/colors.py from:&lt;br /&gt;
self._lut[:,-1] = alpha&lt;br /&gt;
to:&lt;br /&gt;
self._lut[:-1,-1] = alpha&lt;br /&gt;
&lt;br /&gt;
Upon restarting python, pcolormesh should work properly.&lt;br /&gt;
&lt;br /&gt;
For some reason the above link was rather difficult to find, so I thought I&#039;d bump it.&lt;br /&gt;
 
    </content:encoded>

    <pubDate>Mon, 08 Mar 2010 17:27:14 -0700</pubDate>
    <guid isPermaLink="false">http://levikilcher.com/serendipity/index.php?/archives/80-guid.html</guid>
    
</item>

</channel>
</rss>