From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/39523 Path: news.gmane.org!not-for-mail From: "Mojca Miklavec" Newsgroups: gmane.comp.tex.context Subject: Re: mplib Date: Sat, 15 Mar 2008 14:12:48 +0100 Message-ID: <6faad9f00803150612s2e0516ccy6d87c231319f9ab1@mail.gmail.com> References: <47DAB3FD.2050503@wxs.nl> <6faad9f00803141548q1fc98bb7yd896338c9394cbd5@mail.gmail.com> <47DBA279.6030707@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1205586866 21031 80.91.229.12 (15 Mar 2008 13:14:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 15 Mar 2008 13:14:26 +0000 (UTC) Cc: Peter Hedwig To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Sat Mar 15 14:14:54 2008 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 1JaWDu-0005LS-3A for gctc-ntg-context-518@m.gmane.org; Sat, 15 Mar 2008 14:14:54 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id A09C81FC16; Sat, 15 Mar 2008 14:14:08 +0100 (CET) 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 21601-01; Sat, 15 Mar 2008 14:13:29 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 53FF61FB7E; Sat, 15 Mar 2008 14:13:29 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 9B6C41FB7E for ; Sat, 15 Mar 2008 14:13:27 +0100 (CET) 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 21322-01-4 for ; Sat, 15 Mar 2008 14:12:53 +0100 (CET) Original-Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.175]) by ronja.ntg.nl (Postfix) with ESMTP id 103B51FB1F for ; Sat, 15 Mar 2008 14:12:52 +0100 (CET) Original-Received: by wf-out-1314.google.com with SMTP id 23so5285220wfg.5 for ; Sat, 15 Mar 2008 06:12:51 -0700 (PDT) Original-Received: by 10.142.240.9 with SMTP id n9mr5505804wfh.136.1205586770888; Sat, 15 Mar 2008 06:12:50 -0700 (PDT) Original-Received: by 10.143.173.8 with HTTP; Sat, 15 Mar 2008 06:12:48 -0700 (PDT) In-Reply-To: <47DBA279.6030707@wxs.nl> Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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:39523 Archived-At: On Sat, Mar 15, 2008 at 11:18 AM, Hans Hagen wrote: > > Mojca Miklavec wrote: > > On Fri, Mar 14, 2008 at 6:51 PM, Aditya Mahajan wrote: > >> On Fri, 14 Mar 2008, Hans Hagen wrote: > >> > >> > so, if you have specific wishes ... now is the time to let them know > >> > >> Some questions (and hidden wishes) > >> > >> Does this mean that text between metapost graphic and context can be > >> really transparent? Currently \sometxt does not work with all macros, > >> (like an old feature request by Mojca to have two optional arguments for > >> setting the font in the gnuplot module). Will mplib mean that the metapost > >> code can place any tex box at the desired location? > > > > Now that you mention it: I still need to adapt the gnuplot module to > > mkiv, but I'm a bit afraid of asking for help. (The most important > > thing would be to get rid of that stupid catcode trickery inside > > \startGNUPLOTscript ... \stopGNUPLOTscript that always tends to fail > > when one needs it, and to have one-to-one conversion, so that %,#, $, > > .... will have no special meaning.) Then, it would probably be a nice > > benchmark to discover bugs in the library :) > > > > For example, demos from this page (I'm not saying that they're too > > useful since 100x100 is too low resolution anyway): > > http://gnuplot.sourceforge.net/demo_4.3/pm3d.html > > currently all fail because of the "out-of-memory" problem (10.000 > > times "fill unitsquare scaled ... shifted ... withcolor ..."), but > > this might be a ConTeXt problem as well (the text inside > > \startMPgraphic ... \stopMPgraphic probably needs to be stored > > somewhere in TeX, even if there's no need for that). > > let's discuss this a few months from now when i have more code in place > > btw, how difficult would it be to add a lua api to gnuplot, in which > case we could communicate via lua tables Peter Hedwig has already done some work on it: http://peter.affenbande.org/gnuplot/ What his patch does: one calls gnuplot normally, and then, when you say set term lua dashed fontsize 15 "dashed fontsize 15" is parsed by lua. Then, gnuplot does its work, and calls functions: set_linestyle(3) set_color(...) draw_line(...) What Peter did was a mapping from C to lua, so the actual code that does "draw_line" is actually implemented in lua and can easily be changed and/or adapted without recompiling gnuplot. He now "converts" those function calls into TikZ Code, but that could easily be adapted into anything. So: output has already been implemented (and would "only" need to be adapted), while input might need some tweaking. I'm sometimes using a rather simple C++ library which opens gnuplot and pipes "set terminal ...", "plot ..." commands to gnuplot, so one can pass a C table to gnuplot. I could take a look at how it's done there. How do you imagine passing lua tables to gnuplot? Mojca PS: no need to say that even though his terminal is much more popular (it's the only decent LaTeX terminal I know) than the one for ConTeXt, I have seen zero discussion on the gnuplot mailing list about any intentions to integrate that code into gnuplot core. ___________________________________________________________________________________ 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 ___________________________________________________________________________________