Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.graphics.apps.gnuplot > #1158

Re: How to print floats with leading blanks instead of leading zeros using sprintf?

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From valerasimonov@gmail.com
Newsgroups comp.graphics.apps.gnuplot
Subject Re: How to print floats with leading blanks instead of leading zeros using sprintf?
Date Tue, 29 May 2012 06:19:49 -0700 (PDT)
Organization http://groups.google.com
Lines 16
Message-ID <1aaec384-6e42-4a3f-90c9-863babef3225@googlegroups.com> (permalink)
References <3d97629a-6d13-4e42-bb08-9a1d05a569d9@vy7g2000pbc.googlegroups.com> <jq1v66$i8l$1@gwdu112.gwdg.de>
NNTP-Posting-Host 132.206.126.41
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-Trace posting.google.com 1338297590 3146 127.0.0.1 (29 May 2012 13:19:50 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Tue, 29 May 2012 13:19:50 +0000 (UTC)
In-Reply-To <jq1v66$i8l$1@gwdu112.gwdg.de>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=132.206.126.41; posting-account=4Nx8HQoAAACPrCgQ4Rd61O9cDhaTWCLL
User-Agent G2/1.0
X-Received-Bytes 1654
Xref csiph.com comp.graphics.apps.gnuplot:1158

Show key headers only | View raw


On Tuesday, May 29, 2012 3:51:20 AM UTC-4, Christoph Bersch wrote:
> On 28.05.2012 17:09, Валерий Симонов wrote:
> > Hi everyone,
> >
> > I want to specify labels for the plots using sprintf.
> > According to http://www.cplusplus.com/reference/clibrary/cstdio/sprintf/
> > sprintf(' %3.0f',1) should print "001"
> > sprintf(' %3.0d',1) should print "  1".
> 
> sprintf('% 3d', 1)
> 
> Christoph

Christoph, thanks!

Back to comp.graphics.apps.gnuplot | Previous | NextPrevious in thread | Find similar


Thread

How to print floats with leading blanks instead of leading zeros using sprintf? Валерий Симонов <valerasimonov@gmail.com> - 2012-05-28 08:09 -0700
  Re: How to print floats with leading blanks instead of leading zeros using sprintf? sfeam <sfeam@users.sourceforge.net> - 2012-05-28 11:16 -0700
    Re: How to print floats with leading blanks instead of leading zeros using sprintf? Валерий Симонов <valerasimonov@gmail.com> - 2012-05-28 19:33 -0700
      Re: How to print floats with leading blanks instead of leading zeros using sprintf? sfeam <sfeam@users.sourceforge.net> - 2012-05-28 20:48 -0700
        Re: How to print floats with leading blanks instead of leading zeros using sprintf? valerasimonov@gmail.com - 2012-05-29 06:18 -0700
    Re: How to print floats with leading blanks instead of leading zeros using sprintf? valerasimonov@gmail.com - 2012-05-28 20:19 -0700
  Re: How to print floats with leading blanks instead of leading zeros   using sprintf? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2012-05-28 23:32 +0200
    Re: How to print floats with leading blanks instead of leading zeros using sprintf? valerasimonov@gmail.com - 2012-05-28 19:56 -0700
      Re: How to print floats with leading blanks instead of leading zeros   using sprintf? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2012-05-29 18:33 +0200
        Re: How to print floats with leading blanks instead of leading zeros using sprintf? valerasimonov@gmail.com - 2012-05-31 05:43 -0700
  Re: How to print floats with leading blanks instead of leading zeros using sprintf? Christoph Bersch <usenet@bersch.net> - 2012-05-29 09:51 +0200
    Re: How to print floats with leading blanks instead of leading zeros using sprintf? valerasimonov@gmail.com - 2012-05-29 06:19 -0700

csiph-web