import os
import csv
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl #Add "as mpl" for command in line 36
import pylab as py
from scipy.optimize import curve_fit
import xlsxwriter
#Define plot parameters
histNumBins = 150
histAxisMin = 0
histAxisMax = 0.6
plotResol ...
Die Suche ergab 10 Treffer
- Freitag 28. Juli 2017, 08:19
- Forum: Allgemeine Fragen
- Thema: Gauß Least Squares Fit und y-Achse normieren
- Antworten: 1
- Zugriffe: 855
- Donnerstag 27. Juli 2017, 15:01
- Forum: Allgemeine Fragen
- Thema: Achse normieren
- Antworten: 1
- Zugriffe: 1627
Achse normieren
import os
import csv
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl #Add "as mpl" for command in line 36
import pylab as py
import xlsxwriter
histNumBins = 150
histAxisMin = 0
histAxisMax = 0,6 ...
import csv
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl #Add "as mpl" for command in line 36
import pylab as py
import xlsxwriter
histNumBins = 150
histAxisMin = 0
histAxisMax = 0,6 ...
- Mittwoch 19. April 2017, 12:32
- Forum: Allgemeine Fragen
- Thema: Dateiname und Überschrift dynamisch an Dateiname anpassen
- Antworten: 7
- Zugriffe: 1750
Re: Dateiname und Überschrift dynamisch an Dateiname anpassen
name = os.path.splitext(os.path.basename(filename))[0]
png_name = os.path.join(basedir, "{}.png".format(name))
Und den namen kannst du auch als Titel des Plots festlegen, siehe zB http://stackoverflow.com/questions/12444716/how-do-i-set-the-figure-title-and-axes-labels-font-size-in-matplotlib ...
- Mittwoch 19. April 2017, 11:40
- Forum: Allgemeine Fragen
- Thema: Matplotlib-Fehler
- Antworten: 8
- Zugriffe: 1449
Re: Matplotlib-Fehler
Oder liegt es an der Warnung wegen dem Font (siehe erster Post)?
Code: Alles auswählen
#Set font size/style for all plots
font = {'family' : 'normal',
'weight' : 'normal',
'size' : 8}
matplotlib.rc('font', **font)
- Mittwoch 19. April 2017, 11:28
- Forum: Allgemeine Fragen
- Thema: Matplotlib-Fehler
- Antworten: 8
- Zugriffe: 1449
Re: Matplotlib-Fehler
Mein Code für das Histogramm sieht folgendermaßen aus:
fig = plt.figure()
ax1 = fig.add_subplot(111)
histIntra = ax1.hist(intraData, histNumBins, range = [histAxisMin, histAxisMax], label = "Intra distances", facecolor = "b")
ax1.set_xlabel("Hamming-Distance")
ax1.set_ylabel("Occurences amount ...
fig = plt.figure()
ax1 = fig.add_subplot(111)
histIntra = ax1.hist(intraData, histNumBins, range = [histAxisMin, histAxisMax], label = "Intra distances", facecolor = "b")
ax1.set_xlabel("Hamming-Distance")
ax1.set_ylabel("Occurences amount ...
- Mittwoch 19. April 2017, 09:47
- Forum: Allgemeine Fragen
- Thema: Matplotlib-Fehler
- Antworten: 8
- Zugriffe: 1449
Re: Matplotlib-Fehler
Ok. Woran liegt es dann, dass meine Balken keinen Rahmen besitzen?
VG
sports7
VG
sports7
- Dienstag 18. April 2017, 15:36
- Forum: Allgemeine Fragen
- Thema: Matplotlib-Fehler
- Antworten: 8
- Zugriffe: 1449
Matplotlib-Fehler
Hallo zusammen,
bei mir kommt folgender Fehler, wenn ich ein Histogramm zeichnen will:
D:\Programme\WinPython-64bit-3.6.0.1Qt5\python-3.6.0.amd64\lib\site-packages\matplotlib\font_manager.py:1297: UserWarning: findfont: Font family ['normal'] not found. Falling back to DejaVu Sans
(prop.get ...
bei mir kommt folgender Fehler, wenn ich ein Histogramm zeichnen will:
D:\Programme\WinPython-64bit-3.6.0.1Qt5\python-3.6.0.amd64\lib\site-packages\matplotlib\font_manager.py:1297: UserWarning: findfont: Font family ['normal'] not found. Falling back to DejaVu Sans
(prop.get ...
- Dienstag 18. April 2017, 15:33
- Forum: Allgemeine Fragen
- Thema: Dateiname und Überschrift dynamisch an Dateiname anpassen
- Antworten: 7
- Zugriffe: 1750
Re: Dateiname und Überschrift dynamisch an Dateiname anpassen
Ich habe versucht deine genannten Befehle zu verwenden, leider ohne Erfolg. An welcher Stelle muss ich diese denn im Code hinkopieren?
Danke schon im Voraus für deine Hilfe!
VG
Danke schon im Voraus für deine Hilfe!
VG
- Dienstag 18. April 2017, 14:48
- Forum: Allgemeine Fragen
- Thema: Dateiname und Überschrift dynamisch an Dateiname anpassen
- Antworten: 7
- Zugriffe: 1750
Re: Dateiname und Überschrift dynamisch an Dateiname anpassen
import os
import csv
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import pylab as py
import xlsxwriter
#Define input and output path
inputPathExpl = r"C\Programme\Beispiel"
inputPath = inputPathExpl.replace("\\", "/")
outputPathExpl = r"C:\Programme\Beipsiel\Test ...
import csv
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
import pylab as py
import xlsxwriter
#Define input and output path
inputPathExpl = r"C\Programme\Beispiel"
inputPath = inputPathExpl.replace("\\", "/")
outputPathExpl = r"C:\Programme\Beipsiel\Test ...
- Dienstag 18. April 2017, 12:51
- Forum: Allgemeine Fragen
- Thema: Dateiname und Überschrift dynamisch an Dateiname anpassen
- Antworten: 7
- Zugriffe: 1750
Dateiname und Überschrift dynamisch an Dateiname anpassen
Hallo liebe Community,
ich lasse mir ein Histogramm plotten und speichere dieses als .png-Datei ab. Nun möchte ich, dass der Dateiname sowie die Überschrift des Histogramms automatisch den Namen des ausgelesen Excel-Files, das zur Erstellung des Histogramms, annimmt. Gibt es dafür einen Befehl ...
ich lasse mir ein Histogramm plotten und speichere dieses als .png-Datei ab. Nun möchte ich, dass der Dateiname sowie die Überschrift des Histogramms automatisch den Namen des ausgelesen Excel-Files, das zur Erstellung des Histogramms, annimmt. Gibt es dafür einen Befehl ...