ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Paul Menzel <paulepanter@users.sourceforge.net>
To: ntg-context@ntg.nl
Subject: Re: Lua and module gnuplot: Manipulate Gnuplot script with Lua
Date: Mon, 12 Dec 2011 23:44:42 +0100	[thread overview]
Message-ID: <1323729882.26949.107.camel@mattotaupa> (raw)
In-Reply-To: <CALBOmsZBRHLJyyyQw24S19uJNBm+C71=u772EwNV6NEeOYKkgg@mail.gmail.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 722 bytes --]

Am Montag, den 12.12.2011, 23:13 +0100 schrieb Mojca Miklavec:

[…]

> One more example. One thing that would most probably work (I didn't
> try it) would be the following:
> 
> \startGNUPLOTscript[name]
> plot sin(x) t '$\pi = \ctxlua{math.pi()}$'
> \stopGNUPLOTscript

It has some syntax errors, but that is what I tried first and it worked
great. Here is a full example.

        \usemodule[gnuplot]
        
        \startGNUPLOTscript[pi]
        plot pi t '$π = \ctxlua{context(math.pi)}$'
        \stopGNUPLOTscript
        
        \starttext
        \useGNUPLOTgraphic[pi]
        
        \blank
        \CONTEXT\ \contextmark\ \contextversion
        \stoptext


Thanks,

Paul

[-- Attachment #1.1.2: gnup.pdf --]
[-- Type: application/pdf, Size: 15206 bytes --]

[-- Attachment #1.1.3: gnup.tex --]
[-- Type: text/x-tex, Size: 214 bytes --]

\usemodule[gnuplot]

\startGNUPLOTscript[pi]
plot pi t '$π = \ctxlua{context(math.pi)}$'
\stopGNUPLOTscript

\starttext
\useGNUPLOTgraphic[pi]

\blank
\CONTEXT\ \contextmark\ \contextversion
\stoptext

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

  parent reply	other threads:[~2011-12-12 22:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-12 21:39 Paul Menzel
2011-12-12 22:07 ` Mojca Miklavec
2011-12-12 22:13   ` Mojca Miklavec
2011-12-12 22:20     ` Hans Hagen
2011-12-12 22:44     ` Paul Menzel [this message]
2011-12-12 22:35   ` Paul Menzel
2011-12-13  9:10     ` Hans Hagen
2011-12-13  6:52   ` Aditya Mahajan
2011-12-12 22:17 ` Hans Hagen
2011-12-12 22:27   ` Mojca Miklavec
2011-12-13  6:45     ` Aditya 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=1323729882.26949.107.camel@mattotaupa \
    --to=paulepanter@users.sourceforge.net \
    --cc=ntg-context@ntg.nl \
    /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).