I've got following data:
data
Tenor Coupon Price Last 1 Month 1 Year Time
1 3 Month 0.0000 0.0150 0.02% +1 -4 06:45:02
2 6 Month 0.0000 0.0550 0.06% +2 -3 06:22:02
3 12 Month 0.0000 0.0950 0.10% +2 -1 06:50:35
4 2 Year 0.3750 99-22¾ 0.52% +10 +20 06:37:41
5 5 Year 1.5000 99-14½ 1.62% +9 +17 06:37:58
6 10 Year 2.3750 100-12 2.33% +6 -44 06:40:21
7 30 Year 3.1250 101-10½ 3.06% +5 -80 06:35:23
I've downloaded it from this website with help of this topic. Now I want to plot it to look similiar like data from website above. I've used:
my_x <- c(3,6,12,24,12*5,10*12,30*12)
plot(my_x,data$Coupon, type = "l")
But it doesn't look nice, because of values at x axis, but I don't know how to convert first column into desirable format. I've tried to use ggplot2, but I failed as well.
It may be helpful as well:
str(data)
'data.frame': 7 obs. of 7 variables:
$ Tenor : Factor w/ 7 levels "10 Year","12 Month",..: 5 7 2 3 6 1 4
$ Coupon : Factor w/ 5 levels "0.0000","0.3750",..: 1 1 1 2 3 4 5
$ Price : Factor w/ 7 levels "0.0150","0.0550",..: 1 2 3 7 6 4 5
$ Last : Factor w/ 7 levels "0.02%","0.06%",..: 1 2 3 4 5 6 7
$ 1 Month: Factor w/ 6 levels "+1","+10","+2",..: 1 3 3 2 6 5 4
$ 1 Year : Factor w/ 7 levels "-1","+17","+20",..: 5 4 1 3 2 6 7
$ Time : Factor w/ 7 levels "06:22:02","06:35:23",..: 6 1 7 3 4 5 2