[R] Barplots: Editing the frequency x-axis names

Tom.O tom.olsson at dnbnor.com
Fri Jun 8 09:34:55 CEST 2007


Hi thanks for the respone, but cant you be more specific with your example. I
cant see that this will do the trick. What Im looking for is a function that
remembers each position but only displays every n'th date.

For example

position	Returns	    Disply Date
2003-01-31		1		N
2003-02-28		2		N
2003-03-31		3		Yes
2003-04-30		4		N
2003-05-31		5		N
2003-06-30		6		Yes
2003-07-31		7		N
2003-08-31		8		N
2006-09-30		9		Yes
.... and so on until present 

Where I want to display all the returns in a barplot, but where I only want
to display every quarterly date in the plot???

Tom

Knut Krueger-5 wrote:
> 
> Tom.O schrieb:
>> Hi
>> I have a timeSeries object (X) with monthly returns. I want to display
>> the
>> returns with a barplot, which I can fix easily. But my problem is
>> labaling
>> the x-axis, if I use the positions from the timeseries It gets very
>> messy. I
>> have tried rotating and changing the font size but it doesn't do the
>> trick.
>> I think the optimal solution for my purpose is too only display every
>> second
>> or third date, pherhaps only use every 12 month. But how do I do that?
>>
>> Thanks Tom
>>   
> I think you could use:
> 
> library(chron):
> f.e
> x <- c(dates(02/27/92),dates(02/27/95))
> y <- c(10,50)
> plot(x, y)
> 
> Regards Knut
> 
> ______________________________________________
> R-help at 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Barplots%3A-Editing-the-frequency-x-axis-names-tf3888029.html#a11021815
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list