some fixes in the context terminal

0 views
Skip to first unread message

Mojca Miklavec

unread,
Jun 19, 2006, 1:48:51 PM6/19/06
to gnuplot...@googlegroups.com, Willi Egger
This is the example that I wanted to show at the NTG meeting (Willi
kindly sent me the data), but wasn't ready yet at that time:
http://pub.mojca.org/gnuplot/sample/cow/gnuplot-cow.pdf

[I would have to use a non-transparent cow, but I hope that it's OK to
get the idea. I also remember that I was able to change the color of
some other figures some time ago, but that's another issue.]

After taking a closer look to the key/legend I spotted something realy
strange, but that was a pure coincidence ;)

(To Willi: this was the only thing that I wanted to show you and to
thank you for it. You don't need to read any further.)

To try it out:
http://pub.mojca.org/gnuplot/bin/ for Windows (if I uploaded correctly)
http://pub.mojca.org/gnuplot/trm/ for everything else

(I'll upload to the darcs repository as well.)

If I complained about the inability to compile 10 graphics last time,
now 240 graphics were processed in 11 minutes (I think it was a
three-pass-run). (To process more than 5MB file, I would have to
increase TeX memory first, but I didn't find which of hundreds of
options that was.)

I love the new Hans's \sometxt feature, because:
- it uses the same font as in the document without the need to specify
the font separately in MP environment
- no need for uncomfortable way of specifying the definitions/style in
gnuplot-locals.tex (simply all the definitions from the document work,
even \section-s)
- no need for 'verbatimtex ... etex' or for '\def-s' inside metapost
or inside MP environment (which didn't work)
- external figures can be used for points (YUPI :) !!!
- no problems with math and double quotes: I wasn't able to insert
double quotes with textext, now it's trivial
- text is still part of the graphic: can easily be positioned,
colored, shrinked & stretched, ... if I would have to separate it
(according to my first idea), I couldn't use metapost to control the
color, size, ... but I would have to remember the color for each label
separately and the outcome would be different (now I can still place
graphic over text)
- extremely fast
- extremely efficient
- extremely elegant to write

It's exactly what I wanted to have!

Among other unimportand changes I now added:

[I would be grateful if anyone tested this one]
* support for "set terminal context size <something>"
where <something> may be:
- "any" real number in which case the size will be relative to the default one
- two numbers (separated with comma) with or without units (only 'in',
'inch', 'cm' and 'mm' are supported, other are disabled; if someone
thinks that they would be useful, let me know); if no unit is
specified, it means relative size to the default one (5in x 3in - Taco
commented that it would make sense to have 3:2 ratio, but 6in is
already a bit big and 3in or 6cm is too small)
You can also do obscure things such as "set term context size exp(2)
in, 3*1.7 cm".

* textscale <real> scales the default document font size (someone
might want smaller labels in plots than in the rest of the document)

Setting font or size explicitly is not supported yet and for size
calculations 12pt is assumed. If you use the old undocumented and
deprecated option "textext", setting the font face works, but this
will be dropped soon anyway. I only left it there for fun, so that I
can easily generate test files for Hans ;)

* pointswithmetapost / pointswithtex (I urgently need to change the
keywords, but I can't think of some nice name): self-explanatory;
however, points in metapost are not defined yet (minor issue, but I'm
out of ideas) and points in TeX have are yet to be specified in the
module (see the cow above).


I need to slightly change the way that labels are written to the file
now: one reason is that I need to be able to change the typeface and
insert struts (I have to test Hans's latest addition first), the
second that I sometimes need to type "safe" labels (gnuplot sometimes
adds $, _, ...) - at least for demo files - and those have to be
\type-ed or something.
Also don't rely on the name of options. I'm not fully satisfied with
them, but they might give you the idea. Please feel free to comment.

OK, enough for now,
Mojca

Hans Hagen

unread,
Jun 19, 2006, 2:12:07 PM6/19/06
to gnuplot...@googlegroups.com
Mojca Miklavec wrote:
> This is the example that I wanted to show at the NTG meeting (Willi
> kindly sent me the data), but wasn't ready yet at that time:
> http://pub.mojca.org/gnuplot/sample/cow/gnuplot-cow.pdf
>
> [I would have to use a non-transparent cow, but I hope that it's OK to
> get the idea. I also remember that I was able to change the color of
> some other figures some time ago, but that's another issue.]
>
> After taking a closer look to the key/legend I spotted something realy
> strange, but that was a pure coincidence ;)
>
> (To Willi: this was the only thing that I wanted to show you and to
> thank you for it. You don't need to read any further.)
>
> To try it out:
> http://pub.mojca.org/gnuplot/bin/ for Windows (if I uploaded correctly)
> http://pub.mojca.org/gnuplot/trm/ for everything else
>
did you also update the mp-gnuplot and m-gnuplot file? i get:

>> ""
>> picture
! Not implemented: (string)&(picture).
<to be read again>
)
gp_the_text->...t:=textext(gp_font_switch&(EXPR3))

shifted-center.pict_strut;...
gp_put_text->draw(gp_the_text((EXPR2),(EXPR3))

rotated(EXPR1)shifted(EXPR0))w...
l.328 ...t((17.52a, 12.00b), 0, gp_align_right, q)
;

Hans

-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------

Mojca Miklavec

unread,
Jun 20, 2006, 6:48:27 AM6/20/06
to gnuplot...@googlegroups.com
On 6/19/06, Hans Hagen wrote:
> did you also update the mp-gnuplot and m-gnuplot file? i get:

I'm sorry for that. I forgot to mention the location of those files:
http://pub.mojca.org/gnuplot/module/

(I didn't really update m-gnuplot.tex, I just created a temporary
t-gnuplot which doesn't do anything else but load the mp-gnuplot.mp
file. Some more definitions are needed to properly support the new
terminal - currently I experiment with \input only since I'm not that
good in writing ConTeXt code.)

Mojca

Reply all
Reply to author
Forward
0 new messages