|
From: <wa...@ga...> - 2004-06-06 00:08:42
|
Hi,
yet another problem with the metapost term is rotation. I was trying to
produce some rotated labels, and apparently all non 0 angle labels are
treated as vertical, as in very weak terminals, which is a bit of a
shame in metapost. In fact I think it is easier to rotate as needed than
to coerce everything to 0 or 90. This fix works for me:
--- term/metapost.trm 2004-06-06 01:53:12.605250704 +0200
+++ ../gnuplot--mydev/term/metapost.trm 2004-06-06 01:55:09.716447096 +0200
@@ -532,11 +532,11 @@
GPtext:=GPtext shifted\n\
if j = 1: (-(ulcorner GPtext + llcorner GPtext)/2)\n\
elseif j = 2: (-center GPtext)\n\
else: (-(urcorner GPtext + lrcorner GPtext)/2)\n\
fi\n\
- rotated if r > 0: 90 else: 0 fi;\n\
+ rotated r;\n\
draw GPtext shifted (x,y)\n\
enddef;\n", gpoutfile);
}
TERM_PUBLIC void
@@ -756,11 +756,11 @@
TERM_PUBLIC int
MP_text_angle(int ang)
{
/* Metapost code does the conversion */
- MP_ang = (ang ? 1 : 0);
+ MP_ang = ang;
return (TRUE);
}
TERM_PUBLIC int
MP_set_font(const char *font)
I am not posting these corrections as proper patches, but just showing
them here, as being new to gnuplot, and even newer to its code, I cannot
be even sure i fall this is sane. In fact the thing above seems so
obvious, that I suspect there must be a reason, why it is not there
already (but it may well be that it is so, because metapost.trm had been
created based on some simpler trm file).
Andrzej
|