Pull requests for table.py

Hi,

I just wanted to provide some background on the recent flurry of fixes to
table.py and the history behind the code.

See attached pdf.

There are 3 main themes to the changes:

* better automatic setting of the font size
* change how horizontal padding around cell text is calculated
* add ability to specify cell edge colours

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20190613/949e09f0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tabledotpy.pdf
Type: application/pdf
Size: 59879 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20190613/949e09f0/attachment-0001.pdf>

Hi John,

Thanks for your writeup. It provides an interesting historical view on one
of the oldest parts of the Matplotlib codebase, which is always nice read
about.

It is great that you intend to work again on table.py (which was mostly
abandoned by the other core devs), but I am not sure to what extent the new
API you propose has been stabilized, or whether you are still experimenting
with it. There are also other issues with the API design (e.g.
Inconsistent indexing of row and column label cells by Tables · Issue #12931 · matplotlib/matplotlib · GitHub) that you may,
perhaps, want to revisit?

As you may have noticed, making backwards incompatible changes to
Matplotlib is a bit of an onerous process (due to the deprecation process,
the baseline images problem, etc.). Given that table.py is fairly
self-contained, perhaps you may want to consider moving it to its own
separate package? i.e. something published separately on PyPI (let us know
if you need any help for that), so that one would do (for example)

from mpltable import table
table(...)

This way you can play with the API in whatever way you want, and we could
just point to your package as the "new, more modern" way to make tables
with Matplotlib, and possibly import it back to the main repo as a single
PR once everything is stabilized.

Antony

···

On Thu, Jun 13, 2019 at 5:01 PM swfiua at gmail.com <swfiua at gmail.com> wrote:

Hi,

I just wanted to provide some background on the recent flurry of fixes to
table.py and the history behind the code.

See attached pdf.

There are 3 main themes to the changes:

* better automatic setting of the font size
* change how horizontal padding around cell text is calculated
* add ability to specify cell edge colours

John
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
Matplotlib-devel Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20190613/be92f2f5/attachment.html&gt;

John,

I will also add that if you want to got the stand-alone package route we
can put the repo under the Matplotlib org and give you full control of it.

Tom

···

On Thu, Jun 13, 2019 at 11:51 AM Antony Lee <antony.lee at institutoptique.fr> wrote:

Hi John,

Thanks for your writeup. It provides an interesting historical view on
one of the oldest parts of the Matplotlib codebase, which is always nice
read about.

It is great that you intend to work again on table.py (which was mostly
abandoned by the other core devs), but I am not sure to what extent the new
API you propose has been stabilized, or whether you are still experimenting
with it. There are also other issues with the API design (e.g.
Inconsistent indexing of row and column label cells by Tables · Issue #12931 · matplotlib/matplotlib · GitHub) that you may,
perhaps, want to revisit?

As you may have noticed, making backwards incompatible changes to
Matplotlib is a bit of an onerous process (due to the deprecation process,
the baseline images problem, etc.). Given that table.py is fairly
self-contained, perhaps you may want to consider moving it to its own
separate package? i.e. something published separately on PyPI (let us know
if you need any help for that), so that one would do (for example)

from mpltable import table
table(...)

This way you can play with the API in whatever way you want, and we could
just point to your package as the "new, more modern" way to make tables
with Matplotlib, and possibly import it back to the main repo as a single
PR once everything is stabilized.

Antony

On Thu, Jun 13, 2019 at 5:01 PM swfiua at gmail.com <swfiua at gmail.com> wrote:

Hi,

I just wanted to provide some background on the recent flurry of fixes to
table.py and the history behind the code.

See attached pdf.

There are 3 main themes to the changes:

* better automatic setting of the font size
* change how horizontal padding around cell text is calculated
* add ability to specify cell edge colours

John
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
Matplotlib-devel Info Page

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
Matplotlib-devel Info Page

--
Thomas Caswell
tcaswell at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20190613/26b43a22/attachment.html&gt;

Hi John,

Thanks for your writeup. It provides an interesting historical view on
one of the oldest parts of the Matplotlib codebase, which is always nice
read about.

It is great that you intend to work again on table.py

I made no commitment to work on this again in the future :wink:

(which was mostly abandoned by the other core devs), but I am not sure to
what extent the new API you propose has been stabilized, or whether you are
still experimenting with it. There are also other issues with the API
design (e.g. Inconsistent indexing of row and column label cells by Tables · Issue #12931 · matplotlib/matplotlib · GitHub) that
you may, perhaps, want to revisit?

There are four (now 5) pull requests with various API changes / bug fixes
for consideration -- just created one of issue 12931

Those requests themselves resulted in other discussion about API changes
(eg should visible_edges change its name to border?) -- so some on-going
experimentation.

Some of the bugs are such that they can't really be fixed without impacting
the API.

There is a fair bit to discuss here -- most of the feedback that I have
received so far has been about cosmetic stuff with very little comment on
the substance of the changes.

From my point of view I am pretty much done experimenting at this point.

As you may have noticed, making backwards incompatible changes to
Matplotlib is a bit of an onerous process (due to the deprecation process,
the baseline images problem, etc.).

Indeed. Which is a big reason these problems have languished so long.

Just because the process is onerous, doesn't mean it shouldn't be done.

The baseline_images problem feels like the tail wagging the dog.

  Given that table.py is fairly self-contained, perhaps you may want to
consider moving it to its own separate package?

i.e. something published separately on PyPI (let us know if you need any
help for that), so that one would do (for example)

from mpltable import table
table(...)

This way you can play with the API in whatever way you want, and we could
just point to your package as the "new, more modern" way to make tables
with Matplotlib, and possibly import it back to the main repo as a single
PR once everything is stabilized.

Whilst I can see the attraction with this approach, I am not really keen on
it.

Based on my experiences so far trying to help out here, there is no
guarantee that the new table would ever make it into the code and that
would leave me with an increasing maintenance burden of pulling on-going
changes to the code, whilst leaving matplotlib with a buggy and ugly table.

There are pros and cons with one big fix v a bunch of smaller ones. I
lean towards the several smaller fix approach eg issue 12931 should
probably be done as a standalone request, making it easier to back out
later if it becomes necessary.

John

Antony

Hi,

I just wanted to provide some background on the recent flurry of fixes to
table.py and the history behind the code.

See attached pdf.

There are 3 main themes to the changes:

* better automatic setting of the font size
* change how horizontal padding around cell text is calculated
* add ability to specify cell edge colours

John
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
Matplotlib-devel Info Page

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20190613/67e41b26/attachment.html&gt;

···

On Thu, Jun 13, 2019 at 11:42 AM Antony Lee <antony.lee at institutoptique.fr> wrote:

On Thu, Jun 13, 2019 at 5:01 PM swfiua at gmail.com <swfiua at gmail.com> wrote:

So, thinking cap on...

This separate mpltable package does have some distinct advantages in terms
of making any switch, for everyone I think.

When you are ready to switch make mpltable a dependency and import from
that.

Or use it interactively, just import the mpltable.table then I think it is
just axes.add_table(table) you have to use.

The problem (?) with tables is everyone has an opinion how they should
look, so things can get out of control, quickly. Exporting that into a
side discussion is a good idea.

Which is part of the problem with the current flurry of changes: there are
a lot of variants and options to consider. It would be very helpful to
have the freedom to worry less about whose code we break.

It solves another problem, which is where to document some of the history,
which is another sideshoot.

And explain the bits of the code I now think I understand.

That would be an awesome way to go forward.

Thanks for the understanding.

Johnny

···

On Thu, Jun 13, 2019 at 12:04 PM Thomas Caswell <tcaswell at gmail.com> wrote:

John,

I will also add that if you want to got the stand-alone package route we
can put the repo under the Matplotlib org and give you full control of it.

Tom

On Thu, Jun 13, 2019 at 11:51 AM Antony Lee <antony.lee at institutoptique.fr> > wrote:

Hi John,

Thanks for your writeup. It provides an interesting historical view on
one of the oldest parts of the Matplotlib codebase, which is always nice
read about.

It is great that you intend to work again on table.py (which was mostly
abandoned by the other core devs), but I am not sure to what extent the new
API you propose has been stabilized, or whether you are still experimenting
with it. There are also other issues with the API design (e.g.
Inconsistent indexing of row and column label cells by Tables · Issue #12931 · matplotlib/matplotlib · GitHub) that you may,
perhaps, want to revisit?

As you may have noticed, making backwards incompatible changes to
Matplotlib is a bit of an onerous process (due to the deprecation process,
the baseline images problem, etc.). Given that table.py is fairly
self-contained, perhaps you may want to consider moving it to its own
separate package? i.e. something published separately on PyPI (let us know
if you need any help for that), so that one would do (for example)

from mpltable import table
table(...)

This way you can play with the API in whatever way you want, and we could
just point to your package as the "new, more modern" way to make tables
with Matplotlib, and possibly import it back to the main repo as a single
PR once everything is stabilized.

Antony

On Thu, Jun 13, 2019 at 5:01 PM swfiua at gmail.com <swfiua at gmail.com> >> wrote:

Hi,

I just wanted to provide some background on the recent flurry of fixes
to table.py and the history behind the code.

See attached pdf.

There are 3 main themes to the changes:

* better automatic setting of the font size
* change how horizontal padding around cell text is calculated
* add ability to specify cell edge colours

John
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
Matplotlib-devel Info Page

_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel at python.org
Matplotlib-devel Info Page

--
Thomas Caswell
tcaswell at gmail.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20190613/8d1fcd41/attachment-0001.html&gt;