0

I have a timeseries dataframe and here below you can see reproducible data for top 50 rows of my dataframe.

DT1 <- structure(list(Tool = c("M_01", "M_01", "M_01", "M_01", "M_01", 
    "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", 
    "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", 
    "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", 
    "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", 
    "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", "M_01", 
    "M_01", "M_01", "M_01", "M_01", "M_01"), end = structure(c(1429156909, 
    1429157057, 1429157195, 1429158966, 1429159165, 1429159325, 1429159485, 
    1429159598, 1429159717, 1429159835, 1429159955, 1429160075, 1429160205, 
    1429160306, 1429160415, 1429160815, 1429160925, 1429161135, 1429161267, 
    1429161377, 1429161495, 1429161605, 1429161785, 1429161937, 1429162015, 
    1429162097, 1429162195, 1429162285, 1429162375, 1429162475, 1429162575, 
    1429162655, 1429162787, 1429162897, 1429162998, 1429163075, 1429163165, 
    1429163255, 1429163348, 1429163436, 1429163528, 1429163635, 1429163755, 
    1429163845, 1429163927, 1429164145, 1429164235, 1429164335, 1429164418, 
    1429164507), class = c("POSIXct", "POSIXt"), tzone = "")), .Names = c("Tool", 
    "end"), class = c("data.table", "data.frame"), row.names = c(NA, 
    -50L), .internal.selfref = <pointer: 0x00000000001d0788>)

Here is the quick view of my dataframe(complete)

>DT
     Tool                 end
  1: M_01 2015-04-16 06:01:49
  2: M_01 2015-04-16 06:04:17
  3: M_01 2015-04-16 06:06:35
  4: M_01 2015-04-16 06:36:06
  5: M_01 2015-04-16 06:39:25
 ---                         
619: M_01 2015-04-17 05:39:30
620: M_01 2015-04-17 05:44:20
621: M_01 2015-04-17 05:46:08
622: M_01 2015-04-17 05:47:18
623: M_01 2015-04-17 05:49:18

by using ggplot i produced a graph, below is the code

blue.bold.italic.16.text <- element_text(face = "bold", color = "black", size = 16)
s <- ggplot(DT,aes(DT$end,seq_along(DT$end)))+geom_point(size=1.5, shape=2)
 s + 
  theme(axis.title.x=element_blank(), 
  axis.title.y=element_blank(),
  legend.position="none",
  axis.line = element_line(colour="black"),
  axis.text = blue.bold.italic.16.text)

my graph looks like these

enter image description here

I would like to know, how to set intervals(x-axis and y-axis) for a timeseries graph. In my graph I would like to show each hour on x-axis and on y-axis interval of 50/100

in my case the data is continous on x-axis and y-axis and increase no of ticks option will work only for discrete data

Chanti
  • 525
  • 1
  • 5
  • 15
  • possible duplicate of [Increase number of axis ticks in ggplot2](http://stackoverflow.com/questions/11335836/increase-number-of-axis-ticks-in-ggplot2) – Colonel Beauvel Apr 17 '15 at 10:15
  • Your date is `POSIXct` so try using `scale_x_datetime`. This Q might help http://stackoverflow.com/questions/21291004/r-ggplot2-how-to-use-limits-on-posix-axis – user20650 Apr 17 '15 at 11:25

0 Answers0