Seite 1 von 1

Bug in matplotlib für python3

BeitragVerfasst: Nov 15th, '15, 17:47
von schroedingerscat
Hallo Mageia-Community!

Ich wollte heute etwas Kleines mit Python und matplotlib plotten. Dabei ist mir aufgefallen, dass etwas mit matplotlib für python3 nicht stimmt. (python funktioniert jedoch, also in der 2er Version.) Das Problem besteht auf zwei verschiedenen Geräten (Desktop und Laptop). Scheinbar fehlen gewisse Schriftarten für Latex oder so... Proof of Concept Script:

Code: Alles auswählen
import matplotlib.pyplot as plt

plt.clf()
plt.xlabel("$Latex Test$")

plt.show()


Ausgabe:
Code: Alles auswählen
$ python3 matplotlib_POC.py
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['STIXGeneral'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['STIXSizeOneSym'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['STIXSizeTwoSym'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['STIXSizeThreeSym'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['STIXSizeFourSym'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['STIXSizeFiveSym'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['STIXNonUnicode'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['cmb10'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['cmr10'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['cmmi10'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['cmex10'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['cmtt10'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['cmss10'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))
/usr/lib64/python3.4/site-packages/matplotlib/font_manager.py:1282: UserWarning: findfont: Font family ['cmsy10'] not found. Falling back to Bitstream Vera Sans
  (prop.get_family(), self.defaultFamily[fontext]))


Kann jemand den Bug bestätigen? Ich habe noch nie zuvor einen Bug gemeldet, weiss also nicht, wie ich das anstelle... Ich wäre sehr froh, wenn ich durch solche kleinen Bugreports meinen Beitrag leisten könnte. :)

Einen schönen Abend
schroedingerscat

Re: Bug in matplotlib für python3

BeitragVerfasst: Nov 15th, '15, 18:55
von doktor5000

Re: Bug in matplotlib für python3

BeitragVerfasst: Nov 15th, '15, 19:00
von man-draker
schroedingerscat hat geschrieben:Kann jemand den Bug bestätigen?

Ich kann die Fehlermeldungen reproduzieren.
Anscheinend enthält python3-matplotlib nur einen Font (mpltest.ttf), während es in python-matplotlib (also dem Pendant für Python2) wesentlich mehr waren.

Ich habe noch nie zuvor einen Bug gemeldet, weiss also nicht, wie ich das anstelle... Ich wäre sehr froh, wenn ich durch solche kleinen Bugreports meinen Beitrag leisten könnte. :)

Du legst einen Account im Mageia.Bugzilla an, schreibst, welcher Fehler bei dir auftritt und welche Schritte erforderlich sind, um das Problem nachzustellen, also z.B. welche Pakete du selber nachinstalliert hast.
Dabei kannst du darauf hinweisen, dass das Paket für Python2.7 noch alle Fonts enthielt.

Re: Bug in matplotlib für python3

BeitragVerfasst: Nov 15th, '15, 19:09
von doktor5000
man-draker hat geschrieben:Du legst einen Account im Mageia.Bugzilla an

Nein, da er im Forum postet existiert der Account bereits. Siehe auch https://wiki.mageia.org/en/Mageia.org_user_account