rougier / freetype-py

Python binding for the freetype library
Other
298 stars 88 forks source link

matplotlib examples appear to be broken #112

Open buzmeg opened 5 years ago

buzmeg commented 5 years ago

Most of the matplotlib (but not all--hello-world.py and glyph-vector.py, for example, seem to be okay.) examples are having issues. I'm on OS X 10.12.6.

Screenshots attached: Screen Shot 2019-07-08 at 12 50 48 PM Screen Shot 2019-07-08 at 12 51 24 PM Screen Shot 2019-07-08 at 12 51 49 PM Screen Shot 2019-07-08 at 12 52 46 PM Screen Shot 2019-07-08 at 12 53 14 PM Screen Shot 2019-07-08 at 12 53 37 PM Screen Shot 2019-07-08 at 12 56 09 PM Screen Shot 2019-07-08 at 12 57 11 PM Screen Shot 2019-07-08 at 12 57 51 PM

HinTak commented 5 years ago

What do you mean by broken? They are upside down, and in the vector-2 example, the outline is upside down compared to the filled shape. (there is an issue about that already)

rougier commented 5 years ago

Probably due to the origin argument ('lower' or 'upper') in imshow.

buzmeg commented 5 days ago

Closing since no progress for 5 years.

HinTak commented 4 days ago

Well, they are examples, so not really urgent to fix... and fixing them would be somewhat a good first issue for new contributors.

HinTak commented 4 days ago

I'd expand on the earlier comment from @rougier - the problem is likely just the difference in the convention of the co-ordinates in glyph contours, and matplotlib . Matplotlib likely have the origin at the bottom left corner with the y-axis increasing UPWARD, as is custom in mathematics graph plotting. Many (the majority, really, of) computer screen drawing systems have it organised as like how the early computer screens draw things, starting at the top right corner going downward. I think postscript and cairo both have this convention: (0,0) is top right, y-axis increasing DOWNWARD.

Anyway, this is a good new contributor issue...