<p dir="auto">Adjacent patch objects which share an edge show a visible seam at the coincident edge for edgecolor=None.  I've verified via reading the raw text in the pdf file that the points are precisely coincident and only polygons exist and there are no lines outlining the patches.  The problem continues for rasterization via output to png.</p>
<p dir="auto">To demonstrate this problem <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/akturner/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/akturner">@akturner</a>, <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/xylar/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/xylar">@xylar</a>, and myself have devised a test case script:</p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#!/usr/bin/python

import matplotlib as mpl
#mpl.use(&quot;tkagg&quot;)
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from matplotlib.transforms import Affine2D
import mpl_toolkits.axisartist.floating_axes as floating_axes

# define patches 
def p1():
    return patches.Rectangle(
            (0.1, 0.1),   # (x,y)
            0.4,          # width
            0.8,          # height
            linewidth=0,
            edgecolor='none'
            )
def p2():
    return patches.Rectangle(
            (0.5, 0.1),   # (x,y)
            0.4,          # width
            0.8,          # height
            linewidth=0,
            edgecolor='none'
            )

# setup plots
fig1 = plt.figure()

# rectilinear patches in subplot 1
ax1 = fig1.add_subplot(121, aspect='equal')
ax1.add_patch(p1())
ax1.add_patch(p2())
plt.ylim([0,1])
plt.xlim([0,1])


# make rotated version of the above in subplot 2
tr = Affine2D().scale(0.5, 0.5).translate(0.6,0).rotate_deg(30)
grid_helper = floating_axes.GridHelperCurveLinear(tr, extremes=(0, 1, 0, 1))
ax2 = floating_axes.FloatingSubplot(fig1, 122, grid_helper=grid_helper)
fig1.add_subplot(ax2)
aux_ax = ax2.get_aux_axes(tr)
aux_ax.add_patch(p1())
aux_ax.add_patch(p2())
plt.ylim([0,1])
plt.xlim([0,1])

# save figures
plt.savefig('test.pdf')
plt.savefig('test.png')
plt.show()
"><pre class="notranslate"><span class="pl-c">#!/usr/bin/python</span>

<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span> <span class="pl-k">as</span> <span class="pl-s1">mpl</span>
<span class="pl-c">#mpl.use("tkagg")</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">pyplot</span> <span class="pl-k">as</span> <span class="pl-s1">plt</span>
<span class="pl-k">import</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">patches</span> <span class="pl-k">as</span> <span class="pl-s1">patches</span>
<span class="pl-k">from</span> <span class="pl-s1">matplotlib</span>.<span class="pl-s1">transforms</span> <span class="pl-k">import</span> <span class="pl-v">Affine2D</span>
<span class="pl-k">import</span> <span class="pl-s1">mpl_toolkits</span>.<span class="pl-s1">axisartist</span>.<span class="pl-s1">floating_axes</span> <span class="pl-k">as</span> <span class="pl-s1">floating_axes</span>

<span class="pl-c"># define patches </span>
<span class="pl-k">def</span> <span class="pl-en">p1</span>():
    <span class="pl-k">return</span> <span class="pl-s1">patches</span>.<span class="pl-v">Rectangle</span>(
            (<span class="pl-c1">0.1</span>, <span class="pl-c1">0.1</span>),   <span class="pl-c"># (x,y)</span>
            <span class="pl-c1">0.4</span>,          <span class="pl-c"># width</span>
            <span class="pl-c1">0.8</span>,          <span class="pl-c"># height</span>
            <span class="pl-s1">linewidth</span><span class="pl-c1">=</span><span class="pl-c1">0</span>,
            <span class="pl-s1">edgecolor</span><span class="pl-c1">=</span><span class="pl-s">'none'</span>
            )
<span class="pl-k">def</span> <span class="pl-en">p2</span>():
    <span class="pl-k">return</span> <span class="pl-s1">patches</span>.<span class="pl-v">Rectangle</span>(
            (<span class="pl-c1">0.5</span>, <span class="pl-c1">0.1</span>),   <span class="pl-c"># (x,y)</span>
            <span class="pl-c1">0.4</span>,          <span class="pl-c"># width</span>
            <span class="pl-c1">0.8</span>,          <span class="pl-c"># height</span>
            <span class="pl-s1">linewidth</span><span class="pl-c1">=</span><span class="pl-c1">0</span>,
            <span class="pl-s1">edgecolor</span><span class="pl-c1">=</span><span class="pl-s">'none'</span>
            )

<span class="pl-c"># setup plots</span>
<span class="pl-s1">fig1</span> <span class="pl-c1">=</span> <span class="pl-s1">plt</span>.<span class="pl-en">figure</span>()

<span class="pl-c"># rectilinear patches in subplot 1</span>
<span class="pl-s1">ax1</span> <span class="pl-c1">=</span> <span class="pl-s1">fig1</span>.<span class="pl-en">add_subplot</span>(<span class="pl-c1">121</span>, <span class="pl-s1">aspect</span><span class="pl-c1">=</span><span class="pl-s">'equal'</span>)
<span class="pl-s1">ax1</span>.<span class="pl-en">add_patch</span>(<span class="pl-en">p1</span>())
<span class="pl-s1">ax1</span>.<span class="pl-en">add_patch</span>(<span class="pl-en">p2</span>())
<span class="pl-s1">plt</span>.<span class="pl-en">ylim</span>([<span class="pl-c1">0</span>,<span class="pl-c1">1</span>])
<span class="pl-s1">plt</span>.<span class="pl-en">xlim</span>([<span class="pl-c1">0</span>,<span class="pl-c1">1</span>])


<span class="pl-c"># make rotated version of the above in subplot 2</span>
<span class="pl-s1">tr</span> <span class="pl-c1">=</span> <span class="pl-v">Affine2D</span>().<span class="pl-en">scale</span>(<span class="pl-c1">0.5</span>, <span class="pl-c1">0.5</span>).<span class="pl-en">translate</span>(<span class="pl-c1">0.6</span>,<span class="pl-c1">0</span>).<span class="pl-en">rotate_deg</span>(<span class="pl-c1">30</span>)
<span class="pl-s1">grid_helper</span> <span class="pl-c1">=</span> <span class="pl-s1">floating_axes</span>.<span class="pl-v">GridHelperCurveLinear</span>(<span class="pl-s1">tr</span>, <span class="pl-s1">extremes</span><span class="pl-c1">=</span>(<span class="pl-c1">0</span>, <span class="pl-c1">1</span>, <span class="pl-c1">0</span>, <span class="pl-c1">1</span>))
<span class="pl-s1">ax2</span> <span class="pl-c1">=</span> <span class="pl-s1">floating_axes</span>.<span class="pl-v">FloatingSubplot</span>(<span class="pl-s1">fig1</span>, <span class="pl-c1">122</span>, <span class="pl-s1">grid_helper</span><span class="pl-c1">=</span><span class="pl-s1">grid_helper</span>)
<span class="pl-s1">fig1</span>.<span class="pl-en">add_subplot</span>(<span class="pl-s1">ax2</span>)
<span class="pl-s1">aux_ax</span> <span class="pl-c1">=</span> <span class="pl-s1">ax2</span>.<span class="pl-en">get_aux_axes</span>(<span class="pl-s1">tr</span>)
<span class="pl-s1">aux_ax</span>.<span class="pl-en">add_patch</span>(<span class="pl-en">p1</span>())
<span class="pl-s1">aux_ax</span>.<span class="pl-en">add_patch</span>(<span class="pl-en">p2</span>())
<span class="pl-s1">plt</span>.<span class="pl-en">ylim</span>([<span class="pl-c1">0</span>,<span class="pl-c1">1</span>])
<span class="pl-s1">plt</span>.<span class="pl-en">xlim</span>([<span class="pl-c1">0</span>,<span class="pl-c1">1</span>])

<span class="pl-c"># save figures</span>
<span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'test.pdf'</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'test.png'</span>)
<span class="pl-s1">plt</span>.<span class="pl-en">show</span>()</pre></div>
<p dir="auto">The output for pdf shows two seams:</p>
<p dir="auto"><a href="https://github.com/matplotlib/matplotlib/files/66066/test.pdf">test.pdf</a></p>
<p dir="auto">The output for png only shows a seam for the rotated rectangular patches which is why this typically does not show up for colorbars output to png:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/4295853/11885257/3e48cf36-a4dd-11e5-8d43-eca9d9fd2351.png"><img src="https://cloud.githubusercontent.com/assets/4295853/11885257/3e48cf36-a4dd-11e5-8d43-eca9d9fd2351.png" alt="test" style="max-width: 100%;"></a></p>
<p dir="auto">Output to screen also has both seams:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/4295853/11885559/d2fe50b0-a4dd-11e5-92b8-03d9f2eaffad.png"><img src="https://cloud.githubusercontent.com/assets/4295853/11885559/d2fe50b0-a4dd-11e5-92b8-03d9f2eaffad.png" alt="screenshot 2015-12-17 16 38 49" style="max-width: 100%;"></a></p>
<p dir="auto">I can understand why the problem exists for pdf, e.g., <a href="http://www.mathworks.com/matlabcentral/answers/15388-artifacts-in-figures-exported-as-pdf-from-matlab" rel="nofollow">http://www.mathworks.com/matlabcentral/answers/15388-artifacts-in-figures-exported-as-pdf-from-matlab</a>.  It is obviously not desirable that this happens, however, and a solution would be greatly appreciated.</p>
<p dir="auto">Regardless, the rasterization process in the conversion to png should remove this problem.</p>
<p dir="auto">The issue appears to be a graphical aliasing issue because the seam disappears in pdf when smoothing is turned off.  However, this is not the default for most pdf viewers.</p>
<p dir="auto">We have noticed that this problem can be slightly alleviated by two approaches</p>
<ol dir="auto">
<li>edgecolor='face', linewidth=1  However, this distorts the shape of the polygons because colors can be mangled and make the cells appear to be different sizes, e.g., hexes are no longer hexagonal.</li>
<li>Scale each polygon to be slightly bigger.  This solves the problem but it is inelegant and resolution dependent and not a true solution for a vector graphic because the seam will show up at some plotted scale.</li>
</ol>
<p dir="auto">Is there an alternative approach we are missing that fixes this issue?  We suspect that this may be at least a soft bug warranting a warning message in matplotlib if not a solid bug.</p>
<p dir="auto">This is the underlying problem raised in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="6572843" data-permission-text="Title is private" data-url="https://github.com/matplotlib/matplotlib/issues/1178" data-hovercard-type="pull_request" data-hovercard-url="/matplotlib/matplotlib/pull/1178/hovercard" href="https://github.com/matplotlib/matplotlib/pull/1178">#1178</a>.<br>
It is illustrated by the test below; note that boundary anomalies are visible in all forms--agg on the screen, and pdf and svg displayed with a viewer--but in different places depending on the viewer and the size of the figure as rendered.<br>
Note that the colorbar is rendered using pcolormesh, which has its own renderer with agg but otherwise is handled by draw_path_collection.</p>
<pre class="notranslate">import numpy as np
import matplotlib.pyplot as plt

z = np.arange(150)
z.shape = (10,15)

fig, axs = plt.subplots(2,2)

ax = axs[0,0]
cs0 = ax.contourf(z, 20)
cbar0 = fig.colorbar(cs0, ax=ax)

ax = axs[0,1]
cs1 = ax.contourf(z, 20, alpha=0.3)
cbar1 = fig.colorbar(cs1, ax=ax)

ax = axs[1,0]
im2 = ax.imshow(z, interpolation='nearest')
cbar2 = fig.colorbar(im2, ax=ax)

ax = axs[1,1]
im3 = ax.imshow(z, interpolation='nearest', alpha=0.3)
cbar3 = fig.colorbar(im3, ax=ax)

plt.savefig("test1.pdf")
plt.savefig("test1.svg")
plt.show()
</pre>