[Matplotlib-devel] v2.0.0b2

OceanWolf juichenieder-nabb at yahoo.co.uk
Wed Jul 13 19:26:35 EDT 2016


Okay, I have cropped and enlarged the image (see attached) for you to see the problem with how the example renders on my computer.  As you see all of "y"s in "year" sit flush with the bottom (no gap/padding) apart from "20 year" which has a 1px gap from the bottom of the "y" to edge of the cell.  Notice also that the "0"s on 20 and 10 have a one pixel gap above them, whilst on the others they have a 2px gap.

I don't know where the trouble comes from, I haven't looked into the text part of the codebase yet, so I don't know how we calculate the row height and whether/how we use external font-libraries to do some of this for us, so ignoring that, I would expect it to (at least in this simple table situation) calculate a theoretical max height, i.e. from the bottom of the glyph with the lowest descender to the top of the glyph with the highest ascender, and then add whatever padding we specify around that and use that for every text row, so that the imaginary "ascender height" and "descender height" lines seen in the figure here https://en.wikipedia.org/wiki/Ascender_%28typography%29 appear in the same place in each cell.  I have oversimplified my expected logic here for sensible default scenario and assuming 1 line of text per cell, and nothing other than text in the table.

Does that clarify the problem?  I thought that as we touch the default style here we might as well get it looking perfect, but if I go too nitpicky then we can save it for a bug-fix release / feature release.
Best,OceanWolf

      From: Thomas Caswell <tcaswell at gmail.com>
 To: Matthew Brett <matthew.brett at gmail.com> 
Cc: matplotlib development list <matplotlib-devel at python.org>
 Sent: Thursday, 14 July 2016, 0:23
 Subject: Re: [Matplotlib-devel] v2.0.0b2
   
@Matthew Yes please, I just push the source tarball up and am working on sorting out how to turn the crank on the many linux docker
@oceanwolf yes, but I did not understand the issue.
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20160713/a18abc5e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: table_new_zoomed.png
Type: image/png
Size: 10103 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/matplotlib-devel/attachments/20160713/a18abc5e/attachment-0001.png>


More information about the Matplotlib-devel mailing list