Re: [R] simple graphing question

From: benlafleche <benlafleche_at_gmail.com>
Date: Tue, 08 Apr 2008 16:01:58 -0400

This is maybe not the most elegant way, but it does de job. You first put f$RM values in negative form. Then you plot your graph without the x axis labels. After, you create the labels you want.

Try this :

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))

f$rms=f$RM*(-1)
plot(f$TKN~f$rms ,xaxt="n", type="b")

axis(side=1, seq(min(pretty(f$rms,n=3)),max(pretty(f$rms,n=3)),50), labels=seq(min(pretty(f$rm,n=3))*(-1),max(pretty(f$rm,n=3))*(-1),-50))

Benoit Bruneau
Canada

On Apr 8, 2008, at 3:52 PM, stephen sefick wrote:

> 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
>
> ______________________________________________
> 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.


	[[alternative HTML version deleted]]


______________________________________________

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. Received on Tue 08 Apr 2008 - 20:04:49 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 08 Apr 2008 - 20:31:32 GMT.

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

list of date sections of archive