On Wed, Dec 3, 2008 at 7:00 PM, Hans Hagen wrote:
Mojca Miklavec wrote:
Hello,
since Aditya was asking yesterday: I finally patched the gnuplot module to work with mkiv.
There are still some parts for which I'm almost sure that they don't work (I didn't test, but at least an average gnuplot run should not need those features):
1.) colored labels
.... Because withcolor doesn't work; but now that I intercept textext, maybe I can do some dirty tricks there.
why dirty ... i made you:
textext("\\colored[r=.5,g=.3]{your text}"
The main problem was that one had to intercept the string (the terminal gives the same output for all "marks"). The hint that you gave me an hour ago lead me to the following solution that seems to work OK: vardef textext@#(expr txt) = let,=@; save r, g, b; r = redpart gp_color_current; g = greenpart gp_color_current; b = bluepart gp_color_current; rawtextext("\colored[r=" & decimal(r) & ",g=" & decimal(g) & ",b=" & decimal(b) & "]{" & txt & "}") enddef ; Writing the string \colored[...] directly would need heavy modifications in the terminal. Now this hack works really nice.
3.) changing font with gnuplot commands set title "Nice Title" font "iwona,20"
textext("\\definedfont[iwona at 20pt]{your text}")
But that requires modifications to terminal again & incompatibility with output between engines. I'll try to figure out how to do something similar as above. I would like to write this as \sometxt[gp][iwona,20pt]{The Title}. I "just" need to redefine the meaning of \sometxt somehow.
PS: despite switching to mkiv, "reports still don't get written by themselves" :) :) :)
will happen in mkmm (mark mojca miklavec, to be written in 2048)
I thought that was planned for 2068? (At least that was what Ton said, or rather sang.) Mojca