Pyplot und Drucken

Plattformunabhängige GUIs mit wxWidgets.
Antworten
ete
User
Beiträge: 218
Registriert: Montag 19. Februar 2007, 13:19
Kontaktdaten:

Hallo!

Ich möchte mit Pyplot (von der wx Demo abgewandelt) mehrere Diagramme untereinander darstellen und auch drucken.

Leider wird über die Druckfunktion nur das letzte Diagramm gedruckt. Weiss jemand wie ich alle 3 Plots auf einer Seite drucken kann?

Hier mal ein Auszug meines Codes:

Code: Alles auswählen

import wx.lib.plot as plot 

...


def plotting(self):
    for i in plots(nr):
        self.canvas = plot.PlotCanvas(self.panel) 
        self.vbox.Add(self.canvas, 1, wx.EXPAND | wx.ALL, 5) 

        lines = ( 
            plot.PolyLine( 
                coordinates1, colour = "blue", legend = u" Eff Hits", width = 2 
            ), 
            plot.PolyLine( 
                coordinates2, colour = "red", legend = u" All Hits", width = 2 
            ), 
        ) 

        graphics = plot.PlotGraphics( 
            objects = lines#, title = u"Test", xLabel = u"RNAi Query Length"
            , 
            yLabel = a 
        ) 
        self.canvas.Draw(graphics, xAxis = (0, int(seq)), yAxis = (0, 30)) 
...

def OnFilePrint(self, event):
    self.canvas.Printout()
    
...
Liebe Grüsse
Stefanie
http://www.snowflake-sl.info/index.html
Antworten