Witajcie,
mam następujacy kod (działajacy dobrze), który wyswietla wykres z danego pliku o zadanym formacie. Program działa dobrze, ale wywala sie okienko wxPython: stdout/stderr z treścią
agg_filter: unknown
alpha: float (0.0 transparent through 1.0 opaque)
animated: [True | False]
antialiased or aa: [True | False]
axes: an :class:`~matplotlib.axes.Axes` instance
clip_box: a :class:`matplotlib.transforms.Bbox` instance
clip_on: [True | False]
clip_path: [ (:class:`~matplotlib.path.Path`, :class:`~matplotlib.transforms.Transform`) | :class:`~matplotlib.patches.Patch` | None ]
color or c: any matplotlib color
contains: a callable function
dash_capstyle: ['butt' | 'round' | 'projecting']
dash_joinstyle: ['miter' | 'round' | 'bevel']
dashes: sequence of on/off ink in points
data: 2D array (rows are x, y) or two 1D arrays
drawstyle: [ 'default' | 'steps' | 'steps-pre' | 'steps-mid' | 'steps-post' ]
figure: a :class:`matplotlib.figure.Figure` instance
fillstyle: ['full' | 'left' | 'right' | 'bottom' | 'top']
gid: an id string
label: any string
linestyle or ls: [ ``'-'`` | ``'--'`` | ``'-.'`` | ``':'`` | ``'None'`` | ``' '`` | ``''`` ] and any drawstyle in combination with a linestyle, e.g. ``'steps--'``.
linewidth or lw: float value in points
lod: [True | False]
marker: [ ``7`` | ``4`` | ``5`` | ``6`` | ``'o'`` | ``'D'`` | ``'h'`` | ``'H'`` | ``'_'`` | ``''`` | ``None`` | ``'None'`` | ``' '`` | ``'8'`` | ``'p'`` | ``','`` | ``'+'`` | ``'.'`` | ``'s'`` | ``'*'`` | ``'d'`` | ``3`` | ``0`` | ``1`` | ``2`` | ``'1'`` | ``'3'`` | ``'4'`` | ``'2'`` | ``'v'`` | ``'<'`` | ``'>'`` | ``'^'`` | ``'|'`` | ``'x'`` | ``'$...$'`` | *tuple* | *Nx2 array* ]
markeredgecolor or mec: any matplotlib color
markeredgewidth or mew: float value in points
markerfacecolor or mfc: any matplotlib color
markerfacecoloralt or mfcalt: any matplotlib color
markersize or ms: float
markevery: None | integer | (startind, stride)
picker: float distance in points or callable pick function ``fn(artist, event)``
pickradius: float distance in points
rasterized: [True | False | None]
snap: unknown
solid_capstyle: ['butt' | 'round' | 'projecting']
solid_joinstyle: ['miter' | 'round' | 'bevel']
transform: a :class:`matplotlib.transforms.Transform` instance
url: a url string
visible: [True | False]
xdata: 1D array
ydata: 1D array
zorder: any number
Kod programu:
import matplotlib.pyplot as plt
import wx
app = wx.App()
nr=wx.TextEntryDialog(None, "Podaj nr pliku: ", "Program", "")
katalog=wx.TextEntryDialog(None, "Podaj sciezke do katalogu z danymi: ", "Program", "")
if nr.ShowModal()==wx.ID_OK:
plik=nr.GetValue()
if katalog.ShowModal()==wx.ID_OK:
sciezka=katalog.GetValue()
pos,load = np.loadtxt(sciezka + "\\" + plik + ".txt", delimiter='\t', skiprows=5, usecols=(0,1), unpack=True)
lines = plt.plot(pos, load, 'ro')
plt.ylabel('Load [kN]')
plt.xlabel('Position [mm]')
plt.setp(lines)
plt.show()
Cóż mam uczynić, żeby to okienko mi nie wyskakiwało?
Z góry dzieki i pozdrawiam. odpowiedzi potrzebuję do jutra 12:00 :)