[Matplotlib-devel] Pull requests for table.py

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Matplotlib-devel] Pull requests for table.py

swfiua@gmail.com
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
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel

tabledotpy.pdf (80K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Pull requests for table.py

Antony Lee-3
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. https://github.com/matplotlib/matplotlib/issues/12931) 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 [hidden email] <[hidden email]> 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
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: Pull requests for table.py

tcaswell
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 <[hidden email]> 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. https://github.com/matplotlib/matplotlib/issues/12931) 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 [hidden email] <[hidden email]> 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
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel


--
Thomas Caswell
[hidden email]

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: Pull requests for table.py

swfiua@gmail.com
In reply to this post by Antony Lee-3
On Thu, Jun 13, 2019 at 11:42 AM Antony Lee <[hidden email]> 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

I made no commitment to work on this again in the future ;)
 
(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. https://github.com/matplotlib/matplotlib/issues/12931) 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

On Thu, Jun 13, 2019 at 5:01 PM [hidden email] <[hidden email]> 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
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|

Re: Pull requests for table.py

swfiua@gmail.com
In reply to this post by tcaswell



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 <[hidden email]> 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 <[hidden email]> 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. https://github.com/matplotlib/matplotlib/issues/12931) 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 [hidden email] <[hidden email]> 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
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel


--
Thomas Caswell
[hidden email]

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel