From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/49029 Path: news.gmane.org!not-for-mail From: Curiouslearn Newsgroups: gmane.comp.tex.context Subject: Metapost labeling question. Please help Date: Thu, 2 Apr 2009 21:02:03 -0400 Message-ID: <3b4b12310904021802o35521148t8508688ea24ea547@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1129215428==" X-Trace: ger.gmane.org 1238721055 31530 80.91.229.12 (3 Apr 2009 01:10:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Apr 2009 01:10:55 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Fri Apr 03 03:12:13 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LpXwy-0004t0-1x for gctc-ntg-context-518@m.gmane.org; Fri, 03 Apr 2009 03:12:04 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 32CFC1FAD7; Fri, 3 Apr 2009 03:10:35 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 29336-04; Fri, 3 Apr 2009 03:09:59 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 282641FADB; Fri, 3 Apr 2009 03:09:59 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 8693B1FADB for ; Fri, 3 Apr 2009 03:09:57 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 24599-04-2 for ; Fri, 3 Apr 2009 03:09:50 +0200 (CEST) Original-Received: from filter2-nij.mf.surf.net (filter2-nij.mf.surf.net [195.169.124.153]) by ronja.ntg.nl (Postfix) with ESMTP id E9A031FAD7 for ; Fri, 3 Apr 2009 03:09:49 +0200 (CEST) Original-Received: from mail-gx0-f180.google.com (mail-gx0-f180.google.com [209.85.217.180]) by filter2-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n3319lLc006837 for ; Fri, 3 Apr 2009 03:09:48 +0200 Original-Received: by gxk28 with SMTP id 28so1838991gxk.2 for ; Thu, 02 Apr 2009 18:09:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=zQP3j3e6pYLp/lM8QecZKr2zp05akBlFpuXrXOqgfpk=; b=IRhu9p7FZZw7fKHe5SdFEBEFqCy82o6/eUpMAbVlMtWQEgLVaOLiCF10Ez2X5p/vlK 90UEuath74GZGcr1/SYsLfZC3I3Z1PyN6ckrdbSCtdik8Zo8ID92jW4KsNI5+SamJdPI 1crZeseKtMoPmqTPk64WC3QU6Hk4fDWsBis2s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=tIFT5SvIFir90TD5aRSYNphEoA0D1dsBJ+0cckTPerw3zvEEeOmSjpMGfu6aIJ1Luk 0GXgXheVvEGJ7mAnHbT8HU5pgcYA6wTECZkWfmso4CGMhVtRomQ0xzVXILdcB5MpxfxO Wf/l/6K5gjTdi3r16Ro3Zj48ZdN+tHk2hmS8o= Original-Received: by 10.150.136.10 with SMTP id j10mr1200280ybd.11.1238720523608; Thu, 02 Apr 2009 18:02:03 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.217.180; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 203251617 - d57e249b3a55 - 20090403 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.153 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:49029 Archived-At: --===============1129215428== Content-Type: multipart/alternative; boundary=000e0cd5d072c924ed04669c18ff --000e0cd5d072c924ed04669c18ff Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, I want the labels as (0.5,0.55,0.6,0.65,0.7,...,1) or (0.50,0.55,0.60,0.65,0.70,...,1). Either of these two is fine. I tried the following code for this. \starttext \startuseMPgraphic{labeltest} numeric rmin,rmax; rmin := 0.5; rmax := 1; ux := 25cm; uy :=10cm; % draw axes draw (rmin,0)*ux -- (rmax+0.1,0)*ux; draw (rmin,0)*ux -- (rmin*ux,(1.1)*uy); for x = 0.5 step 0.05 until 1.1: label.bot(textext(decimal(x)),(x*ux,x*uy)); endfor; \stopuseMPgraphic \useMPgraphic{labeltest} \stoptext I get (0.5,0.55, 0.6,0.65001,0.70001,0.75002,...,1.00003) instead. I don't understand why I get more than 2 digits after 0.6. Is there a way to restrict the number of digits after the decimal point. Thanks very much. --000e0cd5d072c924ed04669c18ff Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

I want the labels as (0.5,0.55,0.6,0.65,0.7,...,1) o= r=A0(0.50,0.55,0.60,0.65,0.70,...,1). Either of these two is fine.

I tried the following code for this.

\starttext

\startuseMPgraphic{labeltest}=
numeric rmin,rmax;
rmin :=3D 0.5; rmax :=3D 1;
ux := =3D 25cm; uy :=3D10cm;
% draw axes
draw (rmin,0)*ux -- (rmax+0.1,0)*ux;
draw= (rmin,0)*ux -- (rmin*ux,(1.1)*uy);
for x =3D 0.5 step 0.05 until 1.1:
label.bo= t(textext(decimal(x)),(x*ux,x*uy));
endfor;
\stopuseMPgraphic

\useMPgraphic{labeltest}

\stoptext

I get (0.5,0.55, = 0.6,0.65001,0.70001,0.75002,...,1.00003) instead. I don't understand wh= y I get more than 2 digits after 0.6. Is there a way to restrict the number= of digits after the decimal point.=A0

Thanks very much.=A0


--000e0cd5d072c924ed04669c18ff-- --===============1129215428== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============1129215428==--