Does the example code at http://cars9.uchicago.edu/~newville/Python/MPlo=
help at all? I admit I haven't tried this on a linux box in a while,
and maybe not with very recent matplotlib versions. But it works for
me on Windows and Mac, and has worked on linux boxes too. The code
there should definitely be a reasonable place to start.
--Matt Newville <newville at cars.uchicago.edu>
On 11/26/05, Tim Burgess <timb@...> wrote:
> Hi all,
> I am struggling with printing from wxpython. Please dont refer me to the
> wxpython wiki - been there done that.
> I have two almost identical snippets of code to perform a print preview
> and a paper print of a wxmpl figure. The print preview works
> brilliantly, print to paper - nothing happens on the paper. A 0 byte
> print job flashes through the windows print spooler and that's it.
> For text reports I got easy html printing going - that was indeed
> easy.... but I fought and fought with wxPrintout and gave up.... I had
> exactly the same problem - print preview worked fine - but print paper -
> empty print jobs.. I am missing something - but I dont know what. Please
> not the wiki - it's not helping me - it normally is fantastic.
> Can anyone post some code that will print a wxmpl figure? Here's mine -
> it's in a state after several days of failed attempts....
> self.printer_config =3D wx.PrintData()
> print "Printer is: ",
> self.printer_config.GetPrinterName() # no printer name is reported here =
> # yet a print job is sent to the pritner
> tim =3D wxmpl.FigurePrinter(self,self.printer_config)
> tim.printFigure(self.ProdGraph.get_figure(), "Production
> Plan B - my customer wants the graph on paper - he doesnt care how I do
> it - and right now neither do I
> I have wxmpl making a png image in a file - can some one give me the
> minimum lines of code - to get the png on paper - please. Lets say the
> file is called graph.png.
> Tim Burgess
> IT Consultant
> RedHat Certified Engineer
> TBITC Pty Ltd
> Professional Computer Support for Business
> Mobile 0422 942 972
> Office 85 662 016
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> Matplotlib-users mailing list