#copy and paste this into R f <- (structure(list(TKN = c(0.103011025, 0.018633208, 0.104235702, 0.074537363, 0.138286096), RM = c(215, 198, 148, 119, 61)), .Names = c("TKN", "RM"), class = "data.frame", row.names = 25:29)) plot(f$TKN~f$RM, type="b") I would like to reverse the X-Axis. How do I do this? -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis
Try: plot(f$RM~f$TKN, type="b") On Tue, Apr 8, 2008 at 4:18 PM, stephen sefick <ssefick@gmail.com> wrote:> #copy and paste this into R > f <- (structure(list(TKN = c(0.103011025, 0.018633208, 0.104235702, > 0.074537363, 0.138286096), RM = c(215, 198, 148, 119, 61)), .Names > c("TKN", > "RM"), class = "data.frame", row.names = 25:29)) > plot(f$TKN~f$RM, type="b") > > I would like to reverse the X-Axis. How do I do this? > > -- > Let's not spend our time and resources thinking about things that are > so little or so large that all they really do for us is puff us up and > make us feel like gods. We are mammals, and have not exhausted the > annoying little problems of being mammals. > > -K. Mullis > > ______________________________________________ > R-help@r-project.org 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. >-- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
On Tue, Apr 8, 2008 at 3:52 PM, stephen sefick <ssefick at gmail.com> wrote:> Sorry, to have the x-axis to go from 200 to 0 or to reverse the x > points- the line starts on the left hand side of the graph at x=215, > y=0.10301103 ... and end with x=61, y=0.13828610. does this make > sense? reverse order x-axis in excel is what I would use if this > helps > > > > On Tue, Apr 8, 2008 at 3:43 PM, Henrique Dallazuanna <wwwhsd at gmail.com> wrote: > > Try: > > > > plot(f$RM~f$TKN, type="b") > > > > > > > > > > On Tue, Apr 8, 2008 at 4:18 PM, stephen sefick <ssefick at gmail.com> wrote: > > > > > > > > > > > > #copy and paste this into R > > > f <- (structure(list(TKN = c(0.103011025, 0.018633208, 0.104235702, > > > 0.074537363, 0.138286096), RM = c(215, 198, 148, 119, 61)), .Names > > c("TKN", > > > "RM"), class = "data.frame", row.names = 25:29)) > > > plot(f$TKN~f$RM, type="b") > > > > > > I would like to reverse the X-Axis. How do I do this? > > > > > > -- > > > Let's not spend our time and resources thinking about things that are > > > so little or so large that all they really do for us is puff us up and > > > make us feel like gods. We are mammals, and have not exhausted the > > > annoying little problems of being mammals. > > > > > > -K. Mullis > > > > > > > > > ______________________________________________ > > > R-help at r-project.org 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. > > > > > > > > > > > -- > > Henrique Dallazuanna > > Curitiba-Paran?-Brasil > > 25? 25' 40" S 49? 16' 22" O > > > > -- > > > Let's not spend our time and resources thinking about things that are > so little or so large that all they really do for us is puff us up and > make us feel like gods. We are mammals, and have not exhausted the > annoying little problems of being mammals. > > -K. Mullis >-- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis
On Tue, Apr 8, 2008 at 2:18 PM, stephen sefick <ssefick at gmail.com> wrote:> #copy and paste this into R > f <- (structure(list(TKN = c(0.103011025, 0.018633208, 0.104235702, > 0.074537363, 0.138286096), RM = c(215, 198, 148, 119, 61)), .Names = c("TKN", > "RM"), class = "data.frame", row.names = 25:29)) > plot(f$TKN~f$RM, type="b") > > I would like to reverse the X-Axis. How do I do this? >Hello, Stephen: It appears you might be new in R, so let me point out a couple of things. First, this works: f <- data.frame( TKN = c(0.103011025, 0.018633208, 0.104235702,0.074537363, 0.138286096), RM = c(215, 198, 148, 119, 61), row.names = 25:29) plot(TKN~RM, data=f, type="b", xlim=rev(range(f$RM))) Note that I've created your data frame in a more usual way and I've reversed the x axis in the plot by reversing the range of the X variable. I've also used the data option to plot Second, I had reversed an axis before, but I quickly learned how by typing the following command: RSiteSearch("reverse axis") That opened up the web browser and it listed many items, the second of which was this: http://finzi.psych.upenn.edu/R/Rhelp02a/archive/66958.html thread, the title of which is "How to reverse the sequence of axis Y ? " Generally, if you try RSiteSearch() and don't find what you need after exploring a page or two of threads, then you can post here and ask questions without people saying "go read the posting guide before posting questions." Good luck PJ -- Paul E. Johnson Professor, Political Science 1541 Lilac Lane, Room 504 University of Kansas