[R] rotating axis labels in plot with multiple plots

From: Karin Lagesen <karin.lagesen_at_medisin.uio.no>
Date: Fri 18 Aug 2006 - 19:16:03 EST

I have a plot like this, consisting of 18 different vioplots:

(monospaced font)

This I create in such a way that in the graph itself plot 1 appears in the top left corner, and plot 18 in the bottom right corner. I then flip it around when I show it in my paper (it was simpler to do it that way, this might change:)).

I am now trying to make labels a to f, which are a set of numbers which are _local_ to each graph group. Now I would like these numbers to be either vertical to the axis (so that they are in normal text direction when the paper is rotated so that graphs 18-16 are on top), or possibly 45 degrees to the plot group.

This is the way I create labels and such:

        plot.window(xlim = xlim, ylim = ylim)
        axis(2, at = at, labels=toptitle, tick=FALSE)
        if(!bottom) {
          if(!left){ # nothing > ok
            axis(1, at = at, labels = label, tick=FALSE)

}
else{ # not bottom, but left axis(1, at = at, labels = label, las=2)
}
} else{ text(lognumbers, par("usr")[3] - 0.25, srt = 135, adj = 1,labels = loglabels, xpd = TRUE) if(!left){ # bottom, but not left # want to replace this one with the text # axis(4, at = lognumbers, labels=loglabels, las=2)
}
else{ # bottom and left > not ok axis(1, at = at, labels = label, las=2) # want to replace this one with the text # axis(4, at = lognumbers, labels=loglabels, las=2)
}
} }

In this sceme graphs 18-16 are defined as being left, whereas graphs 3, 6, 9, 12, 15, 18 are defined as bottom.

My question relates to my attemt to set nice-looking axis labels using text. When I put them on as they are shown here, they show up on (relative to image above) the left side of the "bottom" graphs. How do I get them to show up on the side I would like them to?

Hope this was somewhat understandable...:)

Karin

-- 
Karin Lagesen, PhD student
karin.lagesen@medisin.uio.no
http://www.cmbn.no/rognes/

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Fri Aug 18 19:23:13 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Fri 18 Aug 2006 - 20:19:59 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.