Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!newsfeed20.multikabel.net!multikabel.net!newsfeed10.multikabel.net!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'url:sourceforge': 0.02; 'scipy': 0.05; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'ssh': 0.09; 'skip:f 30': 0.13; 'matplotlib': 0.16; 'wrote:': 0.18; 'report.': 0.18; 'trying': 0.21; 'header:In-Reply-To:1': 0.22; 'remotely': 0.23; 'skip:m 30': 0.24; 'code': 0.26; 'import': 0.27; 'asking': 0.28; 'singh': 0.29; 'url:listinfo': 0.32; 'list': 0.32; "can't": 0.33; 'header:User-Agent:1': 0.33; 'file': 0.34; 'header:X -Complaints-To:1': 0.34; 'from:addr:yahoo.co.uk': 0.34; 'running': 0.34; 'to:addr:python-list': 0.35; 'received:org': 0.36; 'but': 0.37; 'open': 0.38; 'mailing': 0.39; 'subject:how': 0.39; 'received:78': 0.40; 'to:addr:python.org': 0.40; 'more': 0.61; 'amar': 0.84; 'received:as13285.net': 0.84; 'locally': 0.91; 'subject:made': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: how to get plots made faster Date: Fri, 09 Mar 2012 06:01:23 +0000 References: <5415ca7c-ccc4-4ec3-a118-4674e54038a7@b18g2000vbz.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-146-0-251.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: <5415ca7c-ccc4-4ec3-a118-4674e54038a7@b18g2000vbz.googlegroups.com> X-Antivirus: avast! (VPS 120308-1, 08/03/2012), Outbound message X-Antivirus-Status: Clean X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 42 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1331272909 news.xs4all.nl 6843 [2001:888:2000:d::a6]:34775 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:21420 On 09/03/2012 04:40, amar Singh wrote: > The following is the part of my code which is running faster locally > and more slowly remotely via ssh on the same machine. Note I am trying > to generate a multi-page report. > > > ## create plots and write to a pdf file > from scipy import * > import matplotlib.pyplot as plt > from matplotlib.backends.backend_pdf import PdfPages > > # open a multi-page pdf file > pp = PdfPages('history_plot.pdf') > > F=loadtxt('hist.dat',comments='%') > > > t=F[:,0] > E=F[:,13] > > plt.plot(t,E) > > h1=plt.ylabel('Energy', fontsize=16) > h1=plt.xlabel('Time', fontsize=16) > pp.savefig() > > plt.clf() > VdotB=F[:,14] > plt.plot(t,VdotB) > > pp.savefig() > pp.close() I can't help directly but you may be better off asking on the matplotlib users mailing list see https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Cheers. Mark Lawrence.