Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.026 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'python': 0.08; 'annotations': 0.09; '"copyright",': 0.16; '"credits"': 0.16; '"license"': 0.16; '[gcc': 0.16; 'annotations.': 0.16; 'different,': 0.16; 'linux2': 0.16; '>>>': 0.18; '3.2': 0.18; 'that?': 0.18; 'header:In-Reply-To:1': 0.22; 'sender:addr:gmail.com': 0.25; 'message-id:@mail.gmail.com': 0.28; 'problem': 0.29; 'python3': 0.30; 'received:209.85.210.46': 0.30; 'received:mail-pz0-f46.google.com': 0.30; 'url:library': 0.30; 'does': 0.32; 'scientific': 0.32; 'to:addr:python-list': 0.33; 'url:python': 0.36; 'but': 0.37; 'received:google.com': 0.37; 'received:209.85': 0.38; 'url:docs': 0.39; 'url:org': 0.39; 'why': 0.39; 'subject: (': 0.39; 'received:209': 0.39; 'subject:: ': 0.39; 'to:addr:python.org': 0.40; 'type': 0.60; 'more': 0.61; 'url:string': 0.84; 'legend': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=rW1eNFQXWyrGSn9oH3v+rWkKIc1NOLJs50JXYXgs/Wg=; b=wJnif85M57wdXyjIdO0OW5Wl+8Bkrxh3EmKVw5qihDqGOmAfO/UBmIY+cO8wWWsUtE OI+wp4LPD10RZ7qvHAyxGHRrbu1fyfr7DqFT+6zhlRgMUdvYBkj9tQqZQ5tQ+G4YLK0w mts/akMROHFy0hKlltygj2nDKj6UqWlR5RwWE= MIME-Version: 1.0 Sender: jsf80238@gmail.com In-Reply-To: References: Date: Sun, 15 Jan 2012 03:27:12 +0000 X-Google-Sender-Auth: 7KVm9L7QjQf4XqeRONQD-f2GUpM Subject: Re: scientific notation in legend (pylab) From: Jason Friedman To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326598036 news.xs4all.nl 6872 [2001:888:2000:d::a6]:59786 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18991 > I I would like to have numbers expressed in scientific notation in > legend annotations. Does anybody know how to do that? > Not sure why legend annotations makes the problem different, but perhaps this is a start: $ python3 Python 3.2 (r32:88445, Jun 11 2011, 10:38:04) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print("{:e}".format(1000)) 1.000000e+03 http://docs.python.org/library/string.html