From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/71667 Path: news.gmane.org!not-for-mail From: Paul Menzel Newsgroups: gmane.comp.tex.context Subject: Plotting a graph of a function f, like f(x) = e^x, with MetaPost Date: Wed, 12 Oct 2011 00:45:12 +0200 Message-ID: <1318373112.3726.35.camel@mattotaupa> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0267814080==" X-Trace: dough.gmane.org 1318373140 11684 80.91.229.12 (11 Oct 2011 22:45:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Oct 2011 22:45:40 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 12 00:45:36 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RDl4q-0006yZ-48 for gctc-ntg-context-518@m.gmane.org; Wed, 12 Oct 2011 00:45:36 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id C4D2DCB02D; Wed, 12 Oct 2011 00:45:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FHspJeNOudL1; Wed, 12 Oct 2011 00:45:32 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id B77F2CB02A; Wed, 12 Oct 2011 00:45:31 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 37ABACB02A for ; Wed, 12 Oct 2011 00:45:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id MyptbI+i2oIS for ; Wed, 12 Oct 2011 00:45:18 +0200 (CEST) Original-Received: from filter5-til.mf.surf.net (filter5-til.mf.surf.net [194.171.167.221]) by balder.ntg.nl (Postfix) with ESMTP id EF3FCCB026 for ; Wed, 12 Oct 2011 00:45:17 +0200 (CEST) Original-Received: from mail.gw90.de (mail.gw90.de [188.40.100.199]) by filter5-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p9BMjENN018156 for ; Wed, 12 Oct 2011 00:45:17 +0200 Original-Received: from f053040232.adsl.alicedsl.de ([78.53.40.232] helo=[192.168.178.21]) by mail.gw90.de with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1RDl4Y-0008Od-8H for ntg-context@ntg.nl; Tue, 11 Oct 2011 22:45:18 +0000 X-Mailer: Evolution 3.0.3-2 X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=188.40.100.199; country=DE; latitude=51.0000; longitude=9.0000; http://maps.google.com/maps?q=51.0000,9.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0xFHyJe6b - 8d0ee8be38d3 - 20111012 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.221 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 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 Xref: news.gmane.org gmane.comp.tex.context:71667 Archived-At: --===============0267814080== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-nyyWQdDapuC5CyjmpMcq" --=-nyyWQdDapuC5CyjmpMcq Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear ConTeXt folks, I finally chose MetaPost/MetaFun [1] because of the native integration with ConTeXt and hopefully easy font handling. I want to use that throughout my document. Of course I hit the first problem. Wanting to draw a =E2=80=9Csimple=E2=80= =9D function f like f(x) =3D e^x, seems hard to accomplish. I guess I should stress that MetaPost does not have a high accuracy so it might not be the best solution [5]. There seem to be quite a lot of solutions (mostly macros) on the Web for this problem so I am wondering if one of them is integrated in MetaFun. Here are some of my findings. 1. Reading about the graph package by John D. Hobby [2] and which is also included in ConTeXt [3]. Especially I liked the automatic coordinate systems. The package seems to only be able to plot graphs with data points saved in files. So one solution would be to manually create data files with data points of the relevant function. 2. There is an example in the Drexel Physics Wiki [4]. 3. Anthony Phan has also created some macros in his `mps` [5 (currently not accessible)]. 4. Andr=C3=A9 Heck uses the macro packages `courbes` and `grille` from Jean-Michel Sarlat to show some nice examples in his tutorial =C2=BBLearnin= g Metapost by Doing=C2=AB [6]. So what do you suggest? Thanks, Paul [1] http://www.ntg.nl/pipermail/ntg-context/2011/058527.html [2] http://tug.org/docs/metapost/mpgraph.pdf [3] http://wiki.contextgarden.net/Metapost [4] http://einstein.drexel.edu/liki/index.php/Metapost#Graphing_Functions [5] http://www-math.univ-poitiers.fr/~phan/downloads/metapost/statsman.pdf [6] http://staff.science.uva.nl/~heck/Courses/mptut.pdf --=-nyyWQdDapuC5CyjmpMcq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEABECAAYFAk6UxvgACgkQPX1aK2wOHVjHTQCfUkcGX2g8IVdg0fatmTXoCn+g IZMAn0B7CC2GS5eBCmF0hnvqi3eTz3pp =a7tS -----END PGP SIGNATURE----- --=-nyyWQdDapuC5CyjmpMcq-- --===============0267814080== 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0267814080==--