matplotlib / matplotlib/pytest-mpl

Large diffs from font rendering

Open
#81 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
272
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Hello, thanks for the module.

I know that you are aware of the issues but I'm trying to understand what I can do about them. In particular I see a large difference between two images that are similar, with some apparent minor difference in the font causing the failure.

I've inspected the generated images and they are the same (physical) size, dpi, etc.

I see some discussion (e.g. https://github.com/astropy/astropy/pull/7150) about maybe just choosing the font appropriately to minimize this. Is that the current recommended solution?

I also gave the perceptual hash (#21) a go and it does generate identical hashes for the two images, which is nice. However I haven't yet had time to look into that more to really understand what it is doing so don't necessarily want to rely on it.

Baseline:
baseline-test_plot_dither

Generated. This is missing the title as remove_text=True is enabled (#68 would be relevant here):
test_plot_dither

Diff:
test_plot_dither-failed-diff

This is coming from https://github.com/panoptes/POCS/pull/735

(Note that even getting these images out of travis was a huge pain as travis doesn't allow artifacts to be uploaded on pull-requests...but that's a different issue).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the image comparison from POCS pull request 735 and review the referenced discussion in astropy pull request 7150. Compare the font-rendering differences with the perceptual-hash approach from issue 21; the issue is resolved when a concrete, documented recommendation or defined fix exists.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
testing-qa
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.