ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Cc: Peter Hedwig <peter@affenbande.org>
Subject: Re: mplib
Date: Sat, 15 Mar 2008 14:12:48 +0100	[thread overview]
Message-ID: <6faad9f00803150612s2e0516ccy6d87c231319f9ab1@mail.gmail.com> (raw)
In-Reply-To: <47DBA279.6030707@wxs.nl>

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
___________________________________________________________________________________


  reply	other threads:[~2008-03-15 13:12 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-14 17:21 mplib Hans Hagen
2008-03-14 17:32 ` mplib Santy, Michael
2008-03-14 17:46   ` mplib Hans Hagen
2008-03-14 17:51     ` mplib Santy, Michael
2008-03-14 20:22       ` mplib Hans Hagen
2008-03-14 21:19         ` mplib Taco Hoekwater
2008-03-14 17:51 ` mplib Aditya Mahajan
2008-03-14 22:48   ` mplib Mojca Miklavec
2008-03-15 10:18     ` mplib Hans Hagen
2008-03-15 13:12       ` Mojca Miklavec [this message]
2008-03-16  9:58       ` mplib zs
2008-03-16 10:13         ` mplib Mojca Miklavec
2008-03-15  7:23   ` mplib Taco Hoekwater
     [not found] <mailman.6427.1208935135.4340.ntg-context@ntg.nl>
2008-04-23 11:02 ` mplib Wolfgang Werners-Lucchini
2008-04-23 13:28   ` mplib Taco Hoekwater
     [not found] <mailman.6115.1208677187.4340.ntg-context@ntg.nl>
2008-04-23  6:18 ` mplib Wolfgang Werners-Lucchini
2008-04-23  7:15   ` mplib Taco Hoekwater
     [not found] <mailman.6092.1208622435.4340.ntg-context@ntg.nl>
2008-04-19 21:19 ` mplib Wolfgang Werners-Lucchini
2008-04-19 21:20   ` mplib Hans Hagen
2008-04-19 21:41   ` mplib Taco Hoekwater
     [not found] <mailman.6047.1208588332.4340.ntg-context@ntg.nl>
2008-04-19 16:35 ` mplib Wolfgang Werners-Lucchini
     [not found] <mailman.5882.1208410771.4340.ntg-context@ntg.nl>
2008-04-18 18:40 ` mplib Wolfgang Werners-Lucchini
2008-04-19  6:51   ` mplib Taco Hoekwater
2008-04-19 15:39   ` mplib Taco Hoekwater
     [not found] <mailman.5781.1208303542.4340.ntg-context@ntg.nl>
2008-04-16 22:38 ` mplib Wolfgang Werners-Lucchini
     [not found] <mailman.5741.1208259066.4340.ntg-context@ntg.nl>
2008-04-15 19:22 ` mplib Wolfgang Werners-Lucchini
2008-04-15 21:49   ` mplib Taco Hoekwater
     [not found] <mailman.5117.1208086262.4340.ntg-context@ntg.nl>
2008-04-14 23:13 ` mplib Wolfgang Werners-Lucchini
2008-04-15  7:34   ` mplib Hans Hagen
2008-04-15 11:07   ` mplib Taco Hoekwater
     [not found] <mailman.4851.1207985975.4340.ntg-context@ntg.nl>
2008-04-12 19:47 ` mplib Wolfgang Werners-Lucchini
2008-04-13 10:31   ` mplib Taco Hoekwater
  -- strict thread matches above, loose matches on Subject: below --
2008-04-11 23:37 mplib Wolfgang Werners-Lucchini
2008-04-12  6:59 ` mplib Hans Hagen
2007-03-19 11:28 mplib Hans Hagen
2007-03-19 12:42 ` mplib Hans Hagen
2007-03-19 19:00   ` mplib Karl Berry
2007-03-19 19:06   ` mplib Sanjoy Mahajan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6faad9f00803150612s2e0516ccy6d87c231319f9ab1@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.com \
    --cc=ntg-context@ntg.nl \
    --cc=peter@affenbande.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).