ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* gnuplot module
@ 2011-12-12  0:40 Mojca Miklavec
  2011-12-12  0:49 ` Paul Menzel
  0 siblings, 1 reply; 9+ messages in thread
From: Mojca Miklavec @ 2011-12-12  0:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

(was: gnuplot: `! Undefined control sequence.` with format specifier %)
(sorry, but it was too long to keep it all in title :)

On Mon, Dec 12, 2011 at 01:30, Paul Menzel wrote:
>
> Thank you for the follow up. I just blindly copied the example from the
> Wiki and did not pay any attention. In my thesis, I of course use the
> ConTeXt terminal.

What is the thesis going to be about? (I just noticed that mptopdf
complains about missing bibtex files. :)

> PS: Do you have a BibTeX entry for your gnuplot module?

Do you suggest me to publish an article about the terminal in arXiv,
to get at least some citations by the time when I need to submit my
thesis? :P

But no, I don't have it. I could try to create one though, but I'm not
even sure what the webpage should be. Many scientific programs just
ask to cite their first article in some scientific journal if one uses
the software, but I neither have an article nor homepage apart from
that (still outdated) wiki page.

There is some additional documentation on
https://github.com/mojca/context-gnuplot/tree/master/texmf/doc/context/third/gnuplot
(possibly also in minimals, but I'm not sure when I last synced the
version), but even that is outdated now since they required from me to
strip down terminal options parsing code.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gnuplot module
  2011-12-12  0:40 gnuplot module Mojca Miklavec
@ 2011-12-12  0:49 ` Paul Menzel
  0 siblings, 0 replies; 9+ messages in thread
From: Paul Menzel @ 2011-12-12  0:49 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1775 bytes --]

Am Montag, den 12.12.2011, 01:40 +0100 schrieb Mojca Miklavec:
> (was: gnuplot: `! Undefined control sequence.` with format specifier %)
> (sorry, but it was too long to keep it all in title :)
> 
> On Mon, Dec 12, 2011 at 01:30, Paul Menzel wrote:
> >
> > Thank you for the follow up. I just blindly copied the example from the
> > Wiki and did not pay any attention. In my thesis, I of course use the
> > ConTeXt terminal.
> 
> What is the thesis going to be about?

The topic is how long integrated random walks stay positiv. Not being
able to prove that formally for double-integrated(?) random walk, I am
doing some simulations.

> (I just noticed that mptopdf complains about missing bibtex files. :)

It seems to work for me.

> > PS: Do you have a BibTeX entry for your gnuplot module?
> 
> Do you suggest me to publish an article about the terminal in arXiv,
> to get at least some citations by the time when I need to submit my
> thesis? :P

That is an idea. ;-)

> But no, I don't have it. I could try to create one though, but I'm not
> even sure what the webpage should be. Many scientific programs just
> ask to cite their first article in some scientific journal if one uses
> the software, but I neither have an article nor homepage apart from
> that (still outdated) wiki page.
> 
> There is some additional documentation on
> https://github.com/mojca/context-gnuplot/tree/master/texmf/doc/context/third/gnuplot
> (possibly also in minimals, but I'm not sure when I last synced the
> version), but even that is outdated now since they required from me to
> strip down terminal options parsing code.

I thought asking does not hurt. ;-) So I guess I will just reference
ConTeXt and gnuplot then.


Thanks,

Paul

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gnuplot module
  2008-04-17 14:37                           ` Mojca Miklavec
@ 2008-04-17 15:31                             ` John Devereux
  0 siblings, 0 replies; 9+ messages in thread
From: John Devereux @ 2008-04-17 15:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

"Mojca Miklavec" <mojca.miklavec.lists@gmail.com> writes:

> On Thu, Apr 17, 2008 at 4:27 PM, John Devereux wrote:
>> "Mojca Miklavec" writes:
>>
>>  > Do you have any suggestions about how to reduce the number of files in
>>  > some sensible way?
>>
>>  The ideal would be an option when processing the source file, to turn
>>  off file deletion. Like
>>
>>  texexec document.tex --keep-temporaries
>>
>>  So by default the source directory would be kept clean, but when
>>  "debugging" the intermediate files would be available.
>>
>>  Or perhaps some option passed to \startGNUPLOTscript (or
>>  \useGNUPLOTgraphic) if that is possible?
>>
>>   \startGNUPLOTscript[example][keeptemporaryfile=yes]
>
> This sounds fine (having a --debug-like option), but one more question
> - what about caching existing results? (If all files are deleted, then
> it's not possible to ask for --ifchanged, so gnuplot needs to be run
> each time.)

Actually the configurable temp dir would be OK too.

  texexec document.tex --tempdir=./temporaries

Regarding cacheing, this would be nice but I don't know if it can be
done. I think you still need to run gnuplot in case the data has
changed.

>>  That might be better otherwise debugging a big document could result
>>  it hundreds of files.
>>
>>  Another possibility would be to put the files in /tmp.
>
> That's not too practical.



-- 

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gnuplot module
  2008-04-17 14:27                         ` John Devereux
@ 2008-04-17 14:37                           ` Mojca Miklavec
  2008-04-17 15:31                             ` John Devereux
  0 siblings, 1 reply; 9+ messages in thread
From: Mojca Miklavec @ 2008-04-17 14:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Apr 17, 2008 at 4:27 PM, John Devereux wrote:
> "Mojca Miklavec" writes:
>
>  > Do you have any suggestions about how to reduce the number of files in
>  > some sensible way?
>
>  The ideal would be an option when processing the source file, to turn
>  off file deletion. Like
>
>  texexec document.tex --keep-temporaries
>
>  So by default the source directory would be kept clean, but when
>  "debugging" the intermediate files would be available.
>
>  Or perhaps some option passed to \startGNUPLOTscript (or
>  \useGNUPLOTgraphic) if that is possible?
>
>   \startGNUPLOTscript[example][keeptemporaryfile=yes]

This sounds fine (having a --debug-like option), but one more question
- what about caching existing results? (If all files are deleted, then
it's not possible to ask for --ifchanged, so gnuplot needs to be run
each time.)

>  That might be better otherwise debugging a big document could result
>  it hundreds of files.
>
>  Another possibility would be to put the files in /tmp.

That's not too practical.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gnuplot module
  2008-04-17 14:23                         ` Henning Hraban Ramm
@ 2008-04-17 14:31                           ` Mojca Miklavec
  0 siblings, 0 replies; 9+ messages in thread
From: Mojca Miklavec @ 2008-04-17 14:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Apr 17, 2008 at 4:23 PM, Henning Hraban Ramm wrote:
> Am 2008-04-17 um 15:42 schrieb Mojca Miklavec:
>
> > Do you have any suggestions about how to reduce the number of files in
>  > some sensible way?
>
>  I don't use gnuplot, but it's the same problem with lilypond - lots
>  of files cluttering my project directory.
>
>  It would be a good solution if we could write all those temp files to
>  a configurable directory (that one can delete or not).

A configurable directory would indeed be the perfect solution (also
for other temp files).

>  The problem is probably that our client app (gnuplot, lilypond) or at
>  least ConTeXt's "has changed" testing depends on that files.

Which is not always desirable. If I have
plot 'data.dat'
and change data, then the graph won't be recompiled.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gnuplot module
  2008-04-17 13:42                       ` Mojca Miklavec
  2008-04-17 14:23                         ` Henning Hraban Ramm
@ 2008-04-17 14:27                         ` John Devereux
  2008-04-17 14:37                           ` Mojca Miklavec
  1 sibling, 1 reply; 9+ messages in thread
From: John Devereux @ 2008-04-17 14:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

"Mojca Miklavec" <mojca.miklavec.lists@gmail.com> writes:

> On Wed, Apr 16, 2008 at 9:24 PM, John Devereux wrote:
>> "Mojca Miklavec" writes:
>>
>>  I really like gnuplot and the gnuplot module. It is great to be able
>>  to include the data inline with the document. And it would be nice to
>>  see it part of the distribution. I am using a stock debian gnuplot, so
>>  I don't know the implications of the context and TikZ terminals.
>
> No major difference. But it would (should, at least) be compatible
> with all the three: LaTeX/plain/ConTeXt.
>
>>  Does
>>  it mean I would not end up with so many  *-gnuplot-* files? :)
>
> When I have developed the terminal with enormous Hans's and Taco's
> help, I have asked him to implement some functionality to delete the
> files with ctxtools --purge. He has implemented some functionality
> (\registertempfile or something - need to check), but it deletes the
> files automatically at the end of run, so one either needs to:
> - delete the files
> - leave the files
> - no option to delete files with ctxtools
> The problem with deleting the files immediately is that if you make a
> trivial mistake in the gnuplot script, gnuplot won't create any
> output, and it's rather difficult to spot the error in the long bunch
> of ConTeXt messages. You just get no graphic, any you wonder why.
>
> Do you have any suggestions about how to reduce the number of files in
> some sensible way?

The ideal would be an option when processing the source file, to turn
off file deletion. Like

texexec document.tex --keep-temporaries

So by default the source directory would be kept clean, but when
"debugging" the intermediate files would be available.

Or perhaps some option passed to \startGNUPLOTscript (or
\useGNUPLOTgraphic) if that is possible?

 \startGNUPLOTscript[example][keeptemporaryfile=yes]

That might be better otherwise debugging a big document could result
it hundreds of files.

Another possibility would be to put the files in /tmp.

-- 

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gnuplot module
  2008-04-17 13:42                       ` Mojca Miklavec
@ 2008-04-17 14:23                         ` Henning Hraban Ramm
  2008-04-17 14:31                           ` Mojca Miklavec
  2008-04-17 14:27                         ` John Devereux
  1 sibling, 1 reply; 9+ messages in thread
From: Henning Hraban Ramm @ 2008-04-17 14:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Am 2008-04-17 um 15:42 schrieb Mojca Miklavec:
> Do you have any suggestions about how to reduce the number of files in
> some sensible way?

I don't use gnuplot, but it's the same problem with lilypond - lots  
of files cluttering my project directory.

It would be a good solution if we could write all those temp files to  
a configurable directory (that one can delete or not).
The problem is probably that our client app (gnuplot, lilypond) or at  
least ConTeXt's "has changed" testing depends on that files.
If you find a solution for gnuplot I'd like to copy it for lilypond.


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: gnuplot module
  2008-04-16 19:24                     ` gnuplot module John Devereux
@ 2008-04-17 13:42                       ` Mojca Miklavec
  2008-04-17 14:23                         ` Henning Hraban Ramm
  2008-04-17 14:27                         ` John Devereux
  0 siblings, 2 replies; 9+ messages in thread
From: Mojca Miklavec @ 2008-04-17 13:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, Apr 16, 2008 at 9:24 PM, John Devereux wrote:
> "Mojca Miklavec" writes:
>
>  I really like gnuplot and the gnuplot module. It is great to be able
>  to include the data inline with the document. And it would be nice to
>  see it part of the distribution. I am using a stock debian gnuplot, so
>  I don't know the implications of the context and TikZ terminals.

No major difference. But it would (should, at least) be compatible
with all the three: LaTeX/plain/ConTeXt.

>  Does
>  it mean I would not end up with so many  *-gnuplot-* files? :)

When I have developed the terminal with enormous Hans's and Taco's
help, I have asked him to implement some functionality to delete the
files with ctxtools --purge. He has implemented some functionality
(\registertempfile or something - need to check), but it deletes the
files automatically at the end of run, so one either needs to:
- delete the files
- leave the files
- no option to delete files with ctxtools
The problem with deleting the files immediately is that if you make a
trivial mistake in the gnuplot script, gnuplot won't create any
output, and it's rather difficult to spot the error in the long bunch
of ConTeXt messages. You just get no graphic, any you wonder why.

Do you have any suggestions about how to reduce the number of files in
some sensible way?

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 9+ messages in thread

* gnuplot module
  2008-04-16 18:29                   ` Mojca Miklavec
@ 2008-04-16 19:24                     ` John Devereux
  2008-04-17 13:42                       ` Mojca Miklavec
  0 siblings, 1 reply; 9+ messages in thread
From: John Devereux @ 2008-04-16 19:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

"Mojca Miklavec" <mojca.miklavec.lists@gmail.com> writes:

> On Wed, Apr 16, 2008 at 5:18 PM, John Devereux wrote:
>> "Mojca Miklavec" writes:
>>
>> >>  However I have been using context for years, and may well have messed
>>  >>  something up! It seems to work OK with my "normal" documents. Except I
>>  >>  notice \usemodule[gnuplot] does not work.
>>  >
>>  > What exactly goes wrong?
>>
>>  I have got this working now too. The problems were:
>>
>>   - the syntax seems to have changed since I originally used it. Used
>>     to be \startGNUPLOTgraphic now needs to be \startGNUPLOTscript
>>
>>   - I missed the bit on the wiki about enabling write18
>>
>>   - I was misled by some examples (in the source code) into thinking
>>     that parameters go in curly brackets, but this does not work for
>>     me (and fails silently).
>>
>>  So in the source code you have
>>
>>   \startGNUPLOTscript{sin}
>>       plot sin(x)
>>   \stopGNUPLOTscript
>>   \useGNUPLOTgraphic{sin}
>>
>>  but I needed
>>
>>
>>   \startGNUPLOTscript[sin]
>>       plot sin(x)
>>   \stopGNUPLOTscript
>>   \useGNUPLOTgraphic[sin]
>>
>>  to make it work.
>
> I'm sorry about that. Yes, the syntax change is my fault, but it won't
> happen again. If I wanted to support
>    \useGNUPLOTgraphic[sin][1,3][width=.7\textwidth]
> and alike, the curly braces didn't fit in so nicely.

Yes it's fine, the square brackets are better.

> The module has initially been part of ConTeXt (Hans has written most
> of it at the beginning), but it was easier to develop it as a module
> once I started writing metapost code for the dedicated terminal etc.
>
> I have removed the faulty examples a few days ago (just didn't upload
> the new version yet). I was trying to write code in such a way that
> curly braces would work as well for backward compatibility, but failed
> to do so (the code is there, but only half of it works). However, all
> of these changes have happened rather early in the process and won't
> happen again.
>
> Moreover, it would be nice to get the TikZ terminal working with
> ConTeXt (I need to find some time for it, and then finally convince
> the gnuplot developers to include it into the binary).

I really like gnuplot and the gnuplot module. It is great to be able
to include the data inline with the document. And it would be nice to
see it part of the distribution. I am using a stock debian gnuplot, so
I don't know the implications of the context and TikZ terminals. Does
it mean I would not end up with so many  *-gnuplot-* files? :)

-- 

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-12-12  0:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-12  0:40 gnuplot module Mojca Miklavec
2011-12-12  0:49 ` Paul Menzel
  -- strict thread matches above, loose matches on Subject: below --
2008-04-12 20:53 Unable to generate luatex formats Michael Green
2008-04-15  9:44 ` John Devereux
2008-04-15  9:56   ` Hans Hagen
2008-04-15 10:37     ` John Devereux
2008-04-15 10:46       ` Mojca Miklavec
2008-04-15 11:25         ` John Devereux
2008-04-15 12:17           ` Mojca Miklavec
2008-04-15 12:52             ` John Devereux
2008-04-15 12:59               ` Mojca Miklavec
2008-04-16 15:18                 ` John Devereux
2008-04-16 18:29                   ` Mojca Miklavec
2008-04-16 19:24                     ` gnuplot module John Devereux
2008-04-17 13:42                       ` Mojca Miklavec
2008-04-17 14:23                         ` Henning Hraban Ramm
2008-04-17 14:31                           ` Mojca Miklavec
2008-04-17 14:27                         ` John Devereux
2008-04-17 14:37                           ` Mojca Miklavec
2008-04-17 15:31                             ` John Devereux

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).