<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">When saving the figure as a PDF, the items are grouped unusually, which leads to unexpected results when shown in a viewer that supports <a href="https://www.makeuseof.com/tag/create-knockout-effect-photoshop-illustrator/" rel="nofollow">knockout effects</a>.<br>
While this is not problematic most of the time, the issue causes troubles if the PDF created by matplotlib is edited within Illustrator (possibly other PDF editors as well).</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import matplotlib.pyplot as plt
x = [42,43,44]
y=[42,43,44]
plt.scatter(x,y,alpha=0.7,sizes=[500], linewidths=[5])
plt.savefig('sample.pdf')"><pre class="notranslate"><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-s1">x</span> <span class="pl-c1">=</span> [<span class="pl-c1">42</span>,<span class="pl-c1">43</span>,<span class="pl-c1">44</span>]
<span class="pl-s1">y</span><span class="pl-c1">=</span>[<span class="pl-c1">42</span>,<span class="pl-c1">43</span>,<span class="pl-c1">44</span>]
<span class="pl-s1">plt</span>.<span class="pl-en">scatter</span>(<span class="pl-s1">x</span>,<span class="pl-s1">y</span>,<span class="pl-s1">alpha</span><span class="pl-c1">=</span><span class="pl-c1">0.7</span>,<span class="pl-s1">sizes</span><span class="pl-c1">=</span>[<span class="pl-c1">500</span>], <span class="pl-s1">linewidths</span><span class="pl-c1">=</span>[<span class="pl-c1">5</span>])
<span class="pl-s1">plt</span>.<span class="pl-en">savefig</span>(<span class="pl-s">'sample.pdf'</span>)</pre></div>
<p dir="auto"><strong>Actual outcome</strong><br>
Because I initially thought this is an Illustrator related problem, I posted a <a href="https://forums.adobe.com/thread/2644593" rel="nofollow">(very detailed) description in one of the Adobe Forums</a>.</p>
<p dir="auto">In (MacOS) Preview.app<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11406002/62951802-e85e4580-bdea-11e9-8cce-333205149cd6.png"><img src="https://user-images.githubusercontent.com/11406002/62951802-e85e4580-bdea-11e9-8cce-333205149cd6.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">In Adobe Illustrator:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/11406002/62951867-062baa80-bdeb-11e9-987b-bf1853329bcb.png"><img src="https://user-images.githubusercontent.com/11406002/62951867-062baa80-bdeb-11e9-987b-bf1853329bcb.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">In the Adobe Illustrator forum I got the feedback that the grouping of the items is unusual and causes the confusion. Indeed, <a href="https://forums.adobe.com/message/11206013#11206013" rel="nofollow">ungrouping the elements</a> resolved all of my problems.</p>
<p dir="auto"><strong>Expected outcome</strong><br>
Same as in default preview app.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>
<ul dir="auto">
<li>MacOS 10.14.5</li>
<li>Matplotlib v3.1.1</li>
<li>Matplotlib backend: MacOSX</li>
<li>Python 3.6.7</li>
</ul>
<h3 dir="auto">Bug report</h3>
<p dir="auto"><strong>Bug summary</strong></p>
<p dir="auto">The baseline images for the rgba_markers test (rgba_markers.{png,pdf,svg}) clearly show differences in rendering between agg, pdf and svg:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1322974/34086128-4fa9ac6c-e34e-11e7-86e8-240e8206dd78.png"><img src="https://user-images.githubusercontent.com/1322974/34086128-4fa9ac6c-e34e-11e7-86e8-240e8206dd78.png" alt="rgba_markers" style="max-width: 100%;"></a></p>
<p dir="auto">top left is the svg baseline rendered by inkview (inkscape) 0.92.2, top right is the png baseline, bottom left is the pdf baseline rendered by okular 17.08.3, bottom right is the pdf baseline rendered by gs 9.22 (gs is used by the testing framework to rasterize the pdf for image comparisons).</p>
<p dir="auto"><strong>Code for reproduction</strong></p>
<p dir="auto">N/A</p>
<p dir="auto"><strong>Actual outcome</strong></p>
<p dir="auto">On the right subplot, whether the central blue disk overlaps with the edge red circle depends on the backend... and, for the case of pdf, also on the renderer (so that part may possibly be a bug in eother okular or gs, but at least svg and png should not be different).</p>
<p dir="auto"><strong>Expected outcome</strong></p>
<p dir="auto">All three backends should render hatching in a similar manner.</p>
<p dir="auto"><strong>Matplotlib version</strong></p>

<ul dir="auto">
<li>Operating system:</li>
<li>Matplotlib version: master</li>
<li>Matplotlib backend (<code class="notranslate">print(matplotlib.get_backend())</code>):</li>
<li>Python version:</li>
<li>Jupyter version (if applicable):</li>
<li>Other libraries:</li>
</ul>