matplotlib/mplcairo

asymmetric diamonds

esheldon opened this issue · 2 comments

Thanks for developing this new backend!

I'm seeing asymmetric diamonds when using the mplcairo backend.

Here is an example script to reproduce

import matplotlib as mpl
import matplotlib.pyplot as plt

mpl.use('module://mplcairo.base')

fig, ax = plt.subplots()

x = [3, 4, 5]
y = x

ax.plot(
    x, y,
    marker='d',
    color='#fef0d9',
    markersize=10,
    markeredgecolor='#b30000',
)

fig.savefig('test-mplcairo.png')

The output looks like the following. Note the middle diamond is asymmetric

test-mplcairo

This can be compared to the version created using the Cairo backend

import matplotlib as mpl
import matplotlib.pyplot as plt

mpl.use('Cairo')

fig, ax = plt.subplots()

x = [3, 4, 5]
y = x
ax.plot(
    x, y,
    marker='d',
    color='#fef0d9',
    markersize=10,
    markeredgecolor='#b30000',
)

fig.savefig('test-cairo.png')

which looks fine

test-cairo

Here are versions

>>> mplcairo.get_versions()
{'python': '3.7.6 | packaged by conda-forge | (default, Mar 23 2020, 23:03:20) \n[GCC 7.3.0]', 'mplcairo': '0.3', 'matplotlib': '3.2.2', 'cairo': '1.16.0', 'freetype': '2.10.2', 'pybind11': '2.5.0', 'raqm': None}

Thanks for the report; I can confirm the issue.
I have pushed a fix; can you try master?

Yes, works for me, thank you.