Devon,

On Sat, Dec 27, 2008 at 19:55, Devon McCormick <[email protected]> wrote:
> Harvey - we covered something like this at the first NYCJUG meeting this
> year, so I finally got around to putting up some wiki material on this in
> response to your query: http://www.jsoftware.com/jwiki/NYCJUG/2008-01-08 .
> Maybe this will be helpful.

Yes, that's the same problem. Thank you for taking the time to post
your solution.

I think the example does pretty much what I hacked together: the text
is located based on prior knowledge of the padding from the window
edge to the plot area and the axis mimima and maxima. At least I know
I wasn't jumping through such hoops unnecessarily.

In the case of arbitrary XY data, those minima and maxima are
calculated by jzplot, so I'd either need to fix them myself or do what
I am doing now, setting the offset and scaling parameters on the basis
of trial plots. Neither solution excites me.

It feels to me as if the "correct" solution would be to allow
specifying annotations directly in "graph coordinates". Currently
"pixels" and "scaled to 1000" are possible, both relative to the
window frame. I spent a bit of time nosing around in the jzplot code,
which involved learning a bare minimum about locales (I'll get there
eventually, but I can't do everything at once ...), trying to work out
if I could do this, but it's too much at the moment, with deadines
looming. I got as far as establishing that the data needed, e.g. Gx,
... are only calculated during execution of "pd 'show'", so it would
be necessary to go into the heart of the plot package.

Excel can't do this either without Visual Basic extensions, and then
only inflexibly and awkwardly.

I guess I'll be generating gnuplot scripts for this job, as it allows
labels to be placed at points in any of the several coordinate systems
in play: http://www.gnuplot.info/docs/node193.html

Cheers,
Hamish


-- 
Hamish Harvey
Research Associate, School of Civil Engineering and Geosciences,
Newcastle University
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to