ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
Subject: Re: gnuplot for Mojca
Date: Tue, 3 Jan 2006 21:27:54 +0100	[thread overview]
Message-ID: <6faad9f00601031227k520f1c82k386b7c246e7031f1@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0601031842270.23568@gaston.free.fr>

[-- Attachment #1: Type: text/plain, Size: 3170 bytes --]

On 1/3/06, Peter Münster wrote:
> On Tue, 3 Jan 2006, Mojca Miklavec wrote:
>
> > Thanks a lot. I've learnt a lot from the example, it's only that in
> > the way it's written now it's not compatible with windows.
>
> Hello Mojca,
> if you are using Windows, you can install MinGW, it's free and bash is
> included.

OK, that could be file for me and maybe for two others, but this can't
be a general solution. (Beginners wouldn't install it and the skilled
ones have linux anyway.)

So my question for gurus remains: how to write a macro, so that

\startGnuplotinclusions
set title "trigonometry"
\stopGnuplotinclusions
\startGnuplot
plot sin(x)
\stopGnuplot
\startGnuplot
plot cos(x)
\stopGnuplot

would result in one file with

set terminal postscript
set output "filename1"
set title "trigonometry"
plot sin(x)

and the other one with

set terminal postscript
set output "filename2" # If too complicated, the filename may remain the same
set title "trigonometry"
plot cos(x)

Out of curiosity: does "metafun" check if the buffers were changed, so
that compiling again the same file is skipped next time?
(For a little module as this one it's too little gain for too much anyway.)

> > Gnuplot would also need some kind of \startGnuplotinclusions for stuff like
> >     set nokey
> >     set xlabel "time"
> > plus the lines for setting the terminal which would automatically be added.
>
> or something like \setupGnuplot with keys=vals!

Well, ... yes. That also, of course. Those could be use to set engine
to postscript/eps/metapost/png/... or even LaTeX. (But for the
beginning, I would be greatful for even the dummiest possible
solution.)

If ConTeXt terminal would be written, maybe this could be used also
for setting symbols, default colors, ... etc.

> > (I don't like the postscript terminal itself, but that module s a good start.)
>
> At least, it's not bitmap.

I use LaTeX as the terminal otherwise (but your module can be
modoified to use LaTeX terminal and convert into PDF as well).

If I will find some time and additional motivation (sorry, less
motivation for other things), I would like to modify the
"metapost.trm". It's only 1000 lines (postscript is a bit longer), but
very well structured code and much better understandable than TeX
which is still cryptography for me. (Even in that case I would still
need a lot of help from the ConTeXt side.)

> But there is a white border around the plot. It
> would be nice to have a clipping-option in \externalfigure.

I would prefer to leave the border in this case as the default
behaviour (for example if you have two graphs with different labels,
you want the graphs to have the same size, not cropped because of
slightly different name for the y axis), but I vote for that feature
too. (Hans?)

Some time ago Hans mentioned that texexec can crop, but I didn't
manage to make it work (it was converting from PDF to PS and back, but
it didn't crop anything). There's a nice working script on CTAN
(http://www.ctan.org/tex-archive/support/pdfcrop/) for cropping. I
guess that texexec could do that as well, but some half year ago as I
tried it, I had no luck.

Thanks again for all that,
    Mojca

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

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

  reply	other threads:[~2006-01-03 20:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-02 10:34 Peter Münster
2006-01-03  8:18 ` Mojca Miklavec
2006-01-03 17:49   ` Peter Münster
2006-01-03 20:27     ` Mojca Miklavec [this message]
2006-01-03 21:19       ` Hans Hagen
2006-01-03 21:22       ` Hans Hagen
2006-01-03 22:07       ` Hans Hagen
2006-01-03 22:41         ` Peter Münster
2006-01-04  8:55           ` Hans Hagen
2006-01-04 14:45           ` present for mojca Hans Hagen
2006-01-04 15:34             ` Tobias Burnus
2006-01-04 16:14               ` Hans Hagen
2006-01-05 15:57                 ` Mojca Miklavec
2006-01-05 18:43                   ` Hans Hagen
2006-01-06 12:35                     ` Mojca Miklavec

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=6faad9f00601031227k520f1c82k386b7c246e7031f1@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).