Bug in matplotlib für python3

Dieses Forum ist für die erweiterte Hilfe und Unterstützung vorgesehen:

Bitte stelle hier Deine Fragen zur fortgeschrittenen Benutzung von Mageia. Beispielsweise geht es hier um Fragen zum Netzwerk, automatischen Installationen, komplexer Serverkonfiguration, Kerneltuning, Aufsetzen eines Mageia-Mirrors, kurz gesagt: alle Aufgaben, die auch für erfahrene Benutzer eine Herausforderung sind.

Bug in matplotlib für python3

Beitragvon schroedingerscat » Nov 15th, '15, 17:47

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
schroedingerscat
 
Beiträge: 33
Registriert: Mär 23rd, '14, 17:45

Re: Bug in matplotlib für python3

Beitragvon doktor5000 » Nov 15th, '15, 18:55

Ich bin nicht böse, sondern nur ehrlich. Und wer lesen kann, ist klar im Vorteil.
----
Mageia - the magic continues
Benutzeravatar
doktor5000
 
Beiträge: 6062
Registriert: Jun 2nd, '11, 09:39

Re: Bug in matplotlib für python3

Beitragvon man-draker » Nov 15th, '15, 19:00

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.
"Die letzte Stimme, die man hört, bevor die Welt explodiert, wird die Stimme eines Experten sein, der sagt: 'Das ist technisch unmöglich.'"
(Peter Ustinov)
Benutzeravatar
man-draker
 
Beiträge: 4992
Registriert: Jun 1st, '11, 12:56

Re: Bug in matplotlib für python3

Beitragvon doktor5000 » Nov 15th, '15, 19:09

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
Ich bin nicht böse, sondern nur ehrlich. Und wer lesen kann, ist klar im Vorteil.
----
Mageia - the magic continues
Benutzeravatar
doktor5000
 
Beiträge: 6062
Registriert: Jun 2nd, '11, 09:39


Zurück zu Erweiterter Support

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast