0

I have plotted multiple groups of data in ggplot with facet_grid, and now I want to scale y axis to label some specific values on the axis, just like what I have done on the x axis. However, there are more than one y axis, so simply using scale_y_continuous() seems problematic. Here is part of my code.

ggplot(data,aes(x=TrdDt,y=value,group=variable)) +
  geom_line() +
  facet_grid(variable~.,scales = "free") +
  scale_x_date(breaks = c(as.Date('2007-05-01'),as.Date('2007-05-15'),
                        as.Date('2007-06-01'),as.Date('2007-06-30')),
               labels = c('May01','May15','Jun01','Jun30'))
Roy
  • 539
  • 1
  • 4
  • 12
  • Please read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](http://stackoverflow.com/questions/5963269). This will make it much easier for others to help you. – Axeman Jul 11 '18 at 13:54
  • Look at `scale_y_manual` – akash87 Jul 11 '18 at 14:04
  • I don't exactly understand what you want to do and there is no screenshot, but I think you should look at `scale_y_log10` and `geom_text` or `geom_label` to insert lables to your data – Ibo Jul 13 '18 at 17:39

0 Answers0