[R] changing coordinates?

Jonathan Baron baron at cattell.psych.upenn.edu
Tue Oct 29 08:10:51 CET 2002


On 10/28/02 23:53, Matej Cepl wrote:
>On Mon, Oct 28, 2002 at 10:24:30PM +0100, Richard Mueller wrote:
>> I just detected R and have, after browsing the manual, one question:
>> I look for quite a lot of time for graphical software which allows to 
>> plot data from a table or external file _with the axes of the coordinate 
>> system changed_, i.e. the x-axis should run from top left to bottom 
>> left, and the y-axis from top-left to top-right. It is of no use to 
>> interchange the rows in the table, the coordinate system should rely of 
>> that definition. This type of plot is used in limnological and 
>> oceanological graphs. Until now I could find no software which can do 
>> that job. Perhaps one of you can answer this beginner's question with a 
>> simple yes or no?
>
>R is more statistical package than graphical one -- if you need
>sophisticated graphs then you are probably much better with
>gnuplot (http://www.cs.dartmouth.edu/gnuplot_info.html), which is
>similar to R in being highly sophisticated (and ported on many
>different architectures -- there are well supported ports to both
>Linux and M$-Windows), but it is a pure graphing package.

Although this may be true, if I understand the current question
then it is not so hard to implement in R.  See the axis()
function, particularly its "side" and "labels" paramaters, and,
in the plot function or an earlier par() function, set xaxt="n"
to block plotting of the default axis.  You need labels to make
the x axis go from top to bottom.  Perhaps there is a more
elegant way but I don't know it.

Jon Baron
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list