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


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

Re: howto remove numbers after DOT

X-Received by 10.182.40.136 with SMTP id x8mr12808827obk.31.1434618747417; Thu, 18 Jun 2015 02:12:27 -0700 (PDT)
X-Received by 10.140.21.111 with SMTP id 102mr187906qgk.4.1434618747391; Thu, 18 Jun 2015 02:12:27 -0700 (PDT)
Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!h15no3706354igd.0!news-out.google.com!k20ni2499qgd.0!nntp.google.com!z60no1882653qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.graphics.apps.gnuplot
Date Thu, 18 Jun 2015 02:12:27 -0700 (PDT)
In-Reply-To <mltkiq$a8c$1@newsserver.rrzn.uni-hannover.de>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=125.209.123.163; posting-account=AoEOAAoAAACH2FoJhq9wm1M_2S_VN7zJ
NNTP-Posting-Host 125.209.123.163
References <c6107ef8-49d1-4a31-b753-f90988e4365c@googlegroups.com> <mltkiq$a8c$1@newsserver.rrzn.uni-hannover.de>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <ddd22ccd-43fb-406a-a3cf-35f09ed3486e@googlegroups.com> (permalink)
Subject Re: howto remove numbers after DOT
From Syed Jahanzaib <aacable79@gmail.com>
Injection-Date Thu, 18 Jun 2015 09:12:27 +0000
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Xref csiph.com comp.graphics.apps.gnuplot:2941

Show key headers only | View raw


On Thursday, June 18, 2015 at 10:22:36 AM UTC+5, Jörg Buchholz wrote:
> On 16.06.2015 14:03, Syed Jahanzaib wrote:
> > In gluplot i have graph which shows downloads per day for the month.
> > in labels it shows values like
> > 2500.35
> > 1500.15
> > 6000.45
> >
> > how can i show remove values after . (dot) so that it should show only this
> >
> > 2500
> > 1500
> > 6000
> use "%.0f" as the format specifier in the sprintf command for plotting 
> labels.
> something like this:
> plot "data.txt" using 1:($2/1024/1024):(sprintf("%.0f",$2/1024/1024)) 
> with labels
> Jörg

Thanks it worked perfectly.
One thing more please. 
currently i am graphing downlods for the user account, but issue is the divide forumila. Is there any mehthod in which gnuplot cna auto measure the data like if its in KB , it should KB, if its in MB, it should show MB, if its in GB it should GB or vise versa. 

at a  moment I am dividing the formula like //2014/2014 to get data in GB, but what if data is more and I want to auto show it in TB by auto calulating the values? sorry for bad english.

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


Thread

howto remove numbers after DOT Syed Jahanzaib <aacable79@gmail.com> - 2015-06-16 05:03 -0700
  Re: howto remove numbers after DOT Jörg Buchholz <bookwood4new@freenet.de> - 2015-06-18 07:22 +0200
    Re: howto remove numbers after DOT Syed Jahanzaib <aacable79@gmail.com> - 2015-06-18 02:12 -0700
      iec80000 notation (was: Re: howto remove numbers after DOT) Karl-Friedrich Ratzsch <mail.kfr@gmx.net> - 2015-06-18 20:08 +0200
        Re: iec80000 notation Karl Ratzsch <mail.kfr@gmx.net> - 2015-06-22 22:54 +0200

csiph-web