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>
Subject: Re: \asciimode does not work with gnuplot module
Date: Mon, 21 Jan 2013 10:08:04 +0100	[thread overview]
Message-ID: <CALBOmsb662smsVeb7bGQR3r16CVfAYR=RbyYWcv1zpba-XPzmQ@mail.gmail.com> (raw)
In-Reply-To: <BA0B2D72-E614-40EE-BD58-F8D1DE3EFF6F@gmail.com>

On Mon, Jan 21, 2013 at 9:16 AM, Wolfgang Schuster wrote:
> Am 21.01.2013 um 01:19 schrieb Mojca Miklavec:
>> On Sun, Jan 20, 2013 at 11:06 PM, Marco Patzer wrote:
>>> \usemodule [gnuplot]
>>> \asciimode
>>>
>>> \starttext
>>>  \startGNUPLOTscript [foo]
>>>    plot sin(x)
>>>  \stopGNUPLOTscript
>>>  \useGNUPLOTgraphic [foo]
>>> \stoptext
>>
>> I need help with that one.
>
> At which point does it fail?
>
> - creates context the input file for gnu plot
> - is gnu plot called from context
> - does gnu plot create a output file
> - does it help when you change the terminal setting in context

I'm sorry. I should have been more explicit. Gnuplot runs and creates
the necessary output file(s) which starts with the following for
example:

% Written by ConTeXt terminal for GNUPLOT on: 2013-01-21 01:17 CET
% GNUPLOT version: 4.6.1, terminal version: 1.0.0 (2011-11-05)
% See also http://wiki.contextgarden.net/Gnuplot
%
\startGNUPLOTgraphic[1]
string gnuplotversion; gnuplotversion := "4.6";
... <metapost code here>


The command \useGNUPLOTgraphic[foo] basically calls
\reuseMPgraphic{gpg:foo:1} where "foo" is the name from brackets and 1
is the sequential number.

But instead of the graphic I get the following written to the pdf as text:

% Written by ConTeXt terminal for GNUPLOT on: 2013-01-21 01:17 CET % GNU-
PLOT version: 4.6.1, terminal version: 1.0.0 (2011-11-05) % See also
http://wiki.con-
textgarden.net/Gnuplot %

If I change the graphic to TikZ, I get almost the whole plot, except
for the sine line which is drawn between -10 and approximately -9 and
then disappears. I suspect the culprit is the percentage sign at the
end of the line:

\draw[gp path] (1.410,5.722)--(1.517,5.147)--(1.625,4.524)--(1.732,3.879)--(1.840,3.237)%
  --(1.947,2.626)--(2.055,2.070)--(2.162,1.591)--(2.270,1.210)--(2.377,0.941)--(2.485,0.795)%
  --(2.592,0.779)--(2.699,0.893)--(2.807,1.133)--(2.914,1.488)--(3.022,1.944)--(3.129,2.484)%
... 17 lines altogether
  --(11.618,4.718)--(11.726,4.076)--(11.833,3.431)--(11.941,2.808)--(12.048,2.233);

I didn't test it, but it seems as if everything after the first
percentage sign gets ignored.

I can do a couple more tests with MetaPost and TikZ in \asciimode, but
the fact that the above line gets broken in the middle simply doesn't
seem right (even if my gnuplot module code is clumsy).

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


      reply	other threads:[~2013-01-21  9:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-20 22:06 Marco Patzer
2013-01-21  0:19 ` Mojca Miklavec
2013-01-21  8:16   ` Wolfgang Schuster
2013-01-21  9:08     ` Mojca Miklavec [this message]

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='CALBOmsb662smsVeb7bGQR3r16CVfAYR=RbyYWcv1zpba-XPzmQ@mail.gmail.com' \
    --to=mojca.miklavec.lists@gmail.com \
    --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).