Eliminate mesh / grid lines in python pcolor basemap plot
<p>I'm using Basemap and pcolor to plot a scalar field on a cylindrical projection. The problem I'm having is that the grid lines are drawn: I don't want to see the lines, just the coloured squares. If I wanted grid lines, I would use pcolormesh, right?</p>

<p>The help says that setting edgecolors='none' should eliminate the lines (the same thing as the now-deprecated shading='flat'). In my case, for the real data I'm trying to plot, it doesn't seem to do so.</p>

<p>In did a test where I coloured a little square right over the top of a part of my map: I just made a new 3x3 random array and some suitable lat/lon matrices. In that little test patch the lines between the individual colours are not visible (what I want); I just don't know why, I used the same technique for that as for the real data.</p>

<p>The unwanted grid is black because the map background is black <code>map.drawmapboundary(fill_color='0.05')</code>, where 'map' is a Basemap object:</p>

<pre><code>map = Basemap(projection='cyl',
              resolution='l', 
              llcrnrlon=lon_min, 
              llcrnrlat=lat_min, 
              urcrnrlon=lon_max,
              urcrnrlat=lat_max)
</code></pre>

<p>When I leave the background white, I see a white grid instead of black.</p>

<p>The pcolor command I use is:</p>

<pre><code>mymapim = map.pcolor(mapxvals, mapyvals, datafield, edgecolors='none', vmin=-5, vmax=35, cmap=my_cmap)
</code></pre>

<p>'datafield' is a masked array (not sure whether masking might have something to do with it). 'map*vals' are matrices which have one more row and column than datafield.</p>

<p>So I've spent a lot of time trying to figure this out and trying to find an answer on the web, but I think I'll take this opportunity to ask this community my first question. Thanks for any suggestions. (I haven't been using python for long).</p>

<p>I tried to attach an image showing the issue but I can't until I get some reputation apparently.</p>

<p>Ta!</p>
