mpl_cairo manylinux wheel available

Hi all,
A manylinux wheel for mpl_cairo (https://github.com/anntzer/mpl_cairo) is
now available (under GitHub releases). mpl_cairo is a new, cairo-based
backend for Matplotlib, that offers several improvements over the current
default, Agg-based backend. See the README on GitHub for more details :slight_smile:
I would be interested in hearing your feedback.
Antony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170916/75cfabb8/attachment.html>

Nice! Any plans for an OSX build? Or are they hard?

Cheers,

Matthew

路路路

On Sat, Sep 16, 2017 at 10:10 AM, Antony Lee <anntzer.lee at gmail.com> wrote:

Hi all,
A manylinux wheel for mpl_cairo (https://github.com/anntzer/mpl_cairo) is
now available (under GitHub releases). mpl_cairo is a new, cairo-based
backend for Matplotlib, that offers several improvements over the current
default, Agg-based backend. See the README on GitHub for more details :slight_smile:
I would be interested in hearing your feedback.

I don't think that would be particularly hard (there isn't anything really
specific to Linux in the code, AFAICT), but I don't have access to an OSX
machine with a C++ compiler capable of compiling C++17. <wink>
Antony

2017-09-16 2:43 GMT-07:00 Matthew Brett <matthew.brett at gmail.com>:

路路路

On Sat, Sep 16, 2017 at 10:10 AM, Antony Lee <anntzer.lee at gmail.com> > wrote:
> Hi all,
> A manylinux wheel for mpl_cairo (https://github.com/anntzer/mpl_cairo)
is
> now available (under GitHub releases). mpl_cairo is a new, cairo-based
> backend for Matplotlib, that offers several improvements over the current
> default, Agg-based backend. See the README on GitHub for more details
:slight_smile:
> I would be interested in hearing your feedback.

Nice! Any plans for an OSX build? Or are they hard?

Cheers,

Matthew

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170916/df837965/attachment.html>

Matthew Brett wrote:

路路路

On Sat, Sep 16, 2017 at 10:10 AM, Antony Lee > <anntzer.lee at gmail.com> wrote:

Hi all,
A manylinux wheel for mpl_cairo (https://github.com/anntzer/mpl_cairo) is
now available (under GitHub releases). mpl_cairo is a new, cairo-based
backend for Matplotlib, that offers several improvements over the current
default, Agg-based backend. See the README on GitHub for more details
:slight_smile: I would be interested in hearing your feedback.

Nice! Any plans for an OSX build? Or are they hard?

Cheers,

Matthew

I'm interested in trying this on Fedora linux - but I don't want to use
anaconda. Any suggestions?

Yes, you can use this without conda (I usually don't use conda, it's just
an easy way for me to make sure people can install pycairo...).

There are two possibilites: compile the package yourself, or use the wheel
available under github releases. In either case you need to install
Matplotlib with PR#8771 (so I'd suggest doing this in a venv); there are
(fairly standard) instructions for this in the README or in Matplotlib's
devdocs. Assuming that you have installed the patched Matplotlib, you can
now do one of the following:

1. Compile the package yourself

According to pkgs.org,
聽聽- g++ 7.1 is available in Fedora 26.
聽聽- pycairo>=1.12 ("python3-cairo") is only available in Fedora Rawhide
(Fedora 26 has pycairo 1.10).

If you can install these dependencies, you should be able to just do the
standard `pip install .` or `pip install -e .` (in the same environment as
the patched Matplotlib) and you're good to go.

If you're stuck on Fedora 26, it looks like that version has cairo 1.14
(which is what we *really* care about). So you should be able to get away
with installing the latest pycairo and cairo (1.14), and manually removing
the dependency on pycairo>=1.12 in mpl_cairo's setup.py.

2. Use the compiled wheel.

Basically everything under the "Installation (Linux only)" example still
applies -- just replace the invocation of conda with your dnf (and the
appropriate package names). However in that case you will not be able to
edit the dependency in the wheel (which, again, requires pycairo>=1.12).
Let me know if this is the case, if so then I will build a wheel with a
lower dependency bound.

Antony

2017-09-17 8:26 GMT-07:00 Neal Becker <ndbecker2 at gmail.com>:

Matthew Brett wrote:

>> Hi all,
>> A manylinux wheel for mpl_cairo (https://github.com/anntzer/mpl_cairo)
is
>> now available (under GitHub releases). mpl_cairo is a new, cairo-based
>> backend for Matplotlib, that offers several improvements over the
current
>> default, Agg-based backend. See the README on GitHub for more details
>> :slight_smile: I would be interested in hearing your feedback.
>
> Nice! Any plans for an OSX build? Or are they hard?
>
> Cheers,
>
> Matthew
I'm interested in trying this on Fedora linux - but I don't want to use
anaconda. Any suggestions?

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170917/9011db0a/attachment.html>

路路路

> On Sat, Sep 16, 2017 at 10:10 AM, Antony Lee > > <anntzer.lee at gmail.com> wrote:

(or actually, in the last case, you can just install with pip install
--no-deps, which will also bypass the version check).
Antony

2017-09-17 13:20 GMT-07:00 Antony Lee <antony.lee at berkeley.edu>:

Yes, you can use this without conda (I usually don't use conda, it's just
an easy way for me to make sure people can install pycairo...).

There are two possibilites: compile the package yourself, or use the wheel
available under github releases. In either case you need to install
Matplotlib with PR#8771 (so I'd suggest doing this in a venv); there are
(fairly standard) instructions for this in the README or in Matplotlib's
devdocs. Assuming that you have installed the patched Matplotlib, you can
now do one of the following:

1. Compile the package yourself

According to pkgs.org,
聽聽- g++ 7.1 is available in Fedora 26.
聽聽- pycairo>=1.12 ("python3-cairo") is only available in Fedora Rawhide
(Fedora 26 has pycairo 1.10).

If you can install these dependencies, you should be able to just do the
standard `pip install .` or `pip install -e .` (in the same environment as
the patched Matplotlib) and you're good to go.

If you're stuck on Fedora 26, it looks like that version has cairo 1.14
(which is what we *really* care about). So you should be able to get away
with installing the latest pycairo and cairo (1.14), and manually removing
the dependency on pycairo>=1.12 in mpl_cairo's setup.py.

2. Use the compiled wheel.

Basically everything under the "Installation (Linux only)" example still
applies -- just replace the invocation of conda with your dnf (and the
appropriate package names). However in that case you will not be able to
edit the dependency in the wheel (which, again, requires pycairo>=1.12).
Let me know if this is the case, if so then I will build a wheel with a
lower dependency bound.

Antony

2017-09-17 8:26 GMT-07:00 Neal Becker <ndbecker2 at gmail.com>:

Matthew Brett wrote:

>> Hi all,
>> A manylinux wheel for mpl_cairo (https://github.com/anntzer/mpl_cairo)
is
>> now available (under GitHub releases). mpl_cairo is a new, cairo-based
>> backend for Matplotlib, that offers several improvements over the
current
>> default, Agg-based backend. See the README on GitHub for more details
>> :slight_smile: I would be interested in hearing your feedback.
>
> Nice! Any plans for an OSX build? Or are they hard?
>
> Cheers,
>
> Matthew
I'm interested in trying this on Fedora linux - but I don't want to use
anaconda. Any suggestions?

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170917/1dc0deae/attachment.html>

路路路

> On Sat, Sep 16, 2017 at 10:10 AM, Antony Lee >> > <anntzer.lee at gmail.com> wrote:

This is a good news, thank you. I have two main doubts now:

聽聽聽1. Would it be hard to have a Windows version of it? Since I am quite
聽聽聽new to this, I'm not sure how to do it myself. Is there a good tutorial you
聽聽聽would suggest?
聽聽聽2. Would it work with matplotlib embedded on a wxpython stage or I'm
聽聽聽going to run in some issue if I use this backend?

Regards,
Francesco Faccenda

2017-09-16 11:10 GMT+02:00 Antony Lee <anntzer.lee at gmail.com>:

Hi all,
A manylinux wheel for mpl_cairo (https://github.com/anntzer/mpl_cairo) is
now available (under GitHub releases). mpl_cairo is a new, cairo-based
backend for Matplotlib, that offers several improvements over the current
default, Agg-based backend. See the README on GitHub for more details :slight_smile:
I would be interested in hearing your feedback.
Antony

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170918/2bbd1b82/attachment-0001.html>

Hi,

I looked into compiling on Windows yesterday and it appears that MSVC does
not support yet all the required C++17 features (at least, guaranteed copy
elision and template argument deduction for class templates -- see
https://blogs.msdn.microsoft.com/vcblog/2017/08/11/c17-features-and-stl-fixes-in-vs-2017-15-3/).

From some quick googling, it is apparently expected that full support will

happen "soon" (before the end of 2017) so I may decide to just wait for it
rather than downgrade the code (depending on how much time I want to spend
on this...) but as a consequence, tinkering with mplcairo on Windows would
right now require not only good familiarity with how to compile extension
modules on Windows, but also with C++ to understand how to downgrade the
code, so overall it may be quite tricky for you.

Wx support would require refactoring the wx backend code so that the
rendering part gets strictly decoupled from the windowing part -- this is
e.g. the purpose of PR#8771 that does the same for Qt. Actually, given
that Wx already supports both "native" Wx rendering and Agg rendering, I
expect this to be "relatively" easy, as the separation already mostly
exists (basically we need to replace mentions of Agg by cairo in
backend_wxagg.py). As always, PRs would be welcome.

Antony

2017-09-18 2:06 GMT-07:00 Francesco Faccenda <f.faccenda86 at gmail.com>:

This is a good news, thank you. I have two main doubts now:

聽聽聽1. Would it be hard to have a Windows version of it? Since I am quite
聽聽聽new to this, I'm not sure how to do it myself. Is there a good tutorial you
聽聽聽would suggest?
聽聽聽2. Would it work with matplotlib embedded on a wxpython stage or I'm
聽聽聽going to run in some issue if I use this backend?

Regards,
Francesco Faccenda

2017-09-16 11:10 GMT+02:00 Antony Lee <anntzer.lee at gmail.com>:

Hi all,
A manylinux wheel for mpl_cairo (https://github.com/anntzer/mpl_cairo)
is now available (under GitHub releases). mpl_cairo is a new, cairo-based
backend for Matplotlib, that offers several improvements over the current
default, Agg-based backend. See the README on GitHub for more details :slight_smile:
I would be interested in hearing your feedback.
Antony

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170918/93d8b6c1/attachment.html>

{ https://github.com/matplotlib/matplotlib/pull/9202 + mplcairo master }
now implement a wx-cairo backend.
Antony

2017-09-18 8:46 GMT-07:00 Antony Lee <anntzer.lee at gmail.com>:

Hi,

I looked into compiling on Windows yesterday and it appears that MSVC does
not support yet all the required C++17 features (at least, guaranteed copy
elision and template argument deduction for class templates -- see
https://blogs.msdn.microsoft.com/vcblog/2017/08/11/c17-
features-and-stl-fixes-in-vs-2017-15-3/). From some quick googling, it
is apparently expected that full support will happen "soon" (before the end
of 2017) so I may decide to just wait for it rather than downgrade the code
(depending on how much time I want to spend on this...) but as a
consequence, tinkering with mplcairo on Windows would right now require not
only good familiarity with how to compile extension modules on Windows, but
also with C++ to understand how to downgrade the code, so overall it may be
quite tricky for you.

Wx support would require refactoring the wx backend code so that the
rendering part gets strictly decoupled from the windowing part -- this is
e.g. the purpose of PR#8771 that does the same for Qt. Actually, given
that Wx already supports both "native" Wx rendering and Agg rendering, I
expect this to be "relatively" easy, as the separation already mostly
exists (basically we need to replace mentions of Agg by cairo in
backend_wxagg.py). As always, PRs would be welcome.

Antony

2017-09-18 2:06 GMT-07:00 Francesco Faccenda <f.faccenda86 at gmail.com>:

This is a good news, thank you. I have two main doubts now:

聽聽聽1. Would it be hard to have a Windows version of it? Since I am quite
聽聽聽new to this, I'm not sure how to do it myself. Is there a good tutorial you
聽聽聽would suggest?
聽聽聽2. Would it work with matplotlib embedded on a wxpython stage or I'm
聽聽聽going to run in some issue if I use this backend?

Regards,
Francesco Faccenda

2017-09-16 11:10 GMT+02:00 Antony Lee <anntzer.lee at gmail.com>:

Hi all,
A manylinux wheel for mpl_cairo (https://github.com/anntzer/mpl_cairo)
is now available (under GitHub releases). mpl_cairo is a new, cairo-based
backend for Matplotlib, that offers several improvements over the current
default, Agg-based backend. See the README on GitHub for more details :slight_smile:
I would be interested in hearing your feedback.
Antony

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170918/7d58dc9d/attachment.html>

Thank you Antony for your effort and for such good news. I'm looking
forward to the MSVC full support. In the meanwhile I'll take a look on the
wx-cairo implementation.
Please, let us know any update about this subject, it would be very
appreciable.

Best regards,
Francesco Faccenda

2017-09-19 6:26 GMT+02:00 Antony Lee <anntzer.lee at gmail.com>:

{ https://github.com/matplotlib/matplotlib/pull/9202 + mplcairo master }
now implement a wx-cairo backend.
Antony

2017-09-18 8:46 GMT-07:00 Antony Lee <anntzer.lee at gmail.com>:

Hi,

I looked into compiling on Windows yesterday and it appears that MSVC
does not support yet all the required C++17 features (at least, guaranteed
copy elision and template argument deduction for class templates -- see
https://blogs.msdn.microsoft.com/vcblog/2017/08/11/c17-featu
res-and-stl-fixes-in-vs-2017-15-3/). From some quick googling, it is
apparently expected that full support will happen "soon" (before the end of
2017) so I may decide to just wait for it rather than downgrade the code
(depending on how much time I want to spend on this...) but as a
consequence, tinkering with mplcairo on Windows would right now require not
only good familiarity with how to compile extension modules on Windows, but
also with C++ to understand how to downgrade the code, so overall it may be
quite tricky for you.

Wx support would require refactoring the wx backend code so that the
rendering part gets strictly decoupled from the windowing part -- this is
e.g. the purpose of PR#8771 that does the same for Qt. Actually, given
that Wx already supports both "native" Wx rendering and Agg rendering, I
expect this to be "relatively" easy, as the separation already mostly
exists (basically we need to replace mentions of Agg by cairo in
backend_wxagg.py). As always, PRs would be welcome.

Antony

2017-09-18 2:06 GMT-07:00 Francesco Faccenda <f.faccenda86 at gmail.com>:

This is a good news, thank you. I have two main doubts now:

聽聽聽1. Would it be hard to have a Windows version of it? Since I am
聽聽聽quite new to this, I'm not sure how to do it myself. Is there a good
聽聽聽tutorial you would suggest?
聽聽聽2. Would it work with matplotlib embedded on a wxpython stage or I'm
聽聽聽going to run in some issue if I use this backend?

Regards,
Francesco Faccenda

2017-09-16 11:10 GMT+02:00 Antony Lee <anntzer.lee at gmail.com>:

Hi all,
A manylinux wheel for mpl_cairo (https://github.com/anntzer/mpl_cairo)
is now available (under GitHub releases). mpl_cairo is a new, cairo-based
backend for Matplotlib, that offers several improvements over the current
default, Agg-based backend. See the README on GitHub for more details :slight_smile:
I would be interested in hearing your feedback.
Antony

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
https://mail.python.org/mailman/listinfo/matplotlib-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170919/fdb26a48/attachment.html>

The backend can be selected by setting the MPLBACKEND environment variable
to one of

聽聽聽- module://mplcairo.qt (Qt5 widget, copying data from a cairo image
聽聽聽surface),
聽聽聽- module://mplcairo.wx (wx widget, copying data from a cairo image
聽聽聽surface),
聽聽聽- module://mplcairo.gtk3_native (GTK3 widget, directly drawn onto as a
聽聽聽native surface),
聽聽聽- module://mplcairo.base (No GUI, but can output to EPS, PDF, PS, SVG,
聽聽聽and SVGZ using cairo's implementation, rather than Matplotlib's).

looks like wx is covered :slight_smile:

-CHB

路路路

On Mon, Sep 18, 2017 at 2:06 AM, Francesco Faccenda <f.faccenda86 at gmail.com> wrote:

聽聽聽1.
聽聽聽Would it work with matplotlib embedded on a wxpython stage or I'm
聽聽聽going to run in some issue if I use this backend?\

This from the README:

--

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170921/f0cd9078/attachment.html>

A friend kindly lent me their MacBook (thank you!) and I managed to build a
wheel there too -- it is now uploaded (under Github releases as well), and
the setup.py and instructions have been updated accordingly (TL;DR: clang 5
from homebrew works).
I only did limited testing though, and know very little about compatibility
across OSX versions (all I know is that the wheel installed correctly on
that laptop), so no guarantees.
Antony

2017-09-16 2:43 GMT-07:00 Matthew Brett <matthew.brett at gmail.com>:

路路路

On Sat, Sep 16, 2017 at 10:10 AM, Antony Lee <anntzer.lee at gmail.com> > wrote:
> Hi all,
> A manylinux wheel for mpl_cairo (https://github.com/anntzer/mpl_cairo)
is
> now available (under GitHub releases). mpl_cairo is a new, cairo-based
> backend for Matplotlib, that offers several improvements over the current
> default, Agg-based backend. See the README on GitHub for more details
:slight_smile:
> I would be interested in hearing your feedback.

Nice! Any plans for an OSX build? Or are they hard?

Cheers,

Matthew

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20170928/613a43ea/attachment.html>