Re: [Rd] Re: argument srt for mtext(); was: [R] using text on the x axis ticks rather than numbers

From: Marc Schwartz <MSchwartz_at_medanalytics.com>
Date: Thu 09 Sep 2004 - 00:57:37 EST

On Wed, 2004-09-08 at 09:48, Uwe Ligges wrote:
> Marc Schwartz wrote:

<snip>

> >
> > OK...well, let me think "outside the polygon" for a moment. Notice that
> > I did not say "box", as the shape is not quite fixed yet.... ;-)
> >
> > First, I would not twist your arm on this. There is an option already
> > that solves the problem and provides a great deal of flexibility, as I
> > described in my initial reply in the r-help thread and as others have
> > referenced in prior posts. A new FAQ on this might not be a bad idea
> > however.
> >
> > Second, in scanning do_axis() in plot.c, I wonder if (in any body's
> > mind) it might be easier in some fashion to modify axis() by adding a
> > 'srt' argument? The comments in the relevant sections of the switch()
> > code are:
> >
> > /* The order of processing is important here. */
> > /* We must ensure that the labels are drawn left-to-right. */
> > /* The logic here is getting way too convoluted. */
> > /* This needs a serious rewrite. */
> >
> > If a rewrite is to occur at some point (perhaps as a better use of
> > time), one could feasibly add a check such that if 'srt' is specified in
> > the call to axis (or perhaps the higher level plots as part of the '...'
> > argument), do_text() is used (with sensible defaults for 'x,' y', 'xpd',
> > 'mar', etc.) instead of GMMathText() and/or GMtext() as it is at
> > present?
>
> a) "This needs a serious rewrite" means that it needs a serious rewrite. ;-)

OK...no more joking around then... ;-)

> b) if do_text is used, you have to deal with the clipping stuff again.

which is why a change in 'xpd' would be required as I mentioned.

> c) It is very easy to do it in GMText, since "angle" is used anyway to
> rotate the text.
> As an example, replace in GMtext (graphics.c) all lines containing angle
> = ... by, e.g., angle = 45 and play around. Just the wrappers have to be
> modified a little bit. It's work of half a day, if nobody expects that
> something very fuzzy happens ...

OK...just thought that I would raise it for consideration.

As Roseanne Rosanna-Danna would say: "Never Mind"... :-)

Thanks Uwe.

Marc



R-devel@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu Sep 09 01:02:07 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:14 EST