Thanks, that worked. Best regards, Maxim
2016-01-21 22:29 GMT+03:00 Ulrik Stervbo <ulrik.ster...@gmail.com>: > > You can try facet_grid(variable~., scales = "free_y") > > On Thu, 21 Jan 2016 at 19:29 Maxim Fomin <mxfo...@gmail.com> wrote: >> >> Dear R users, >> >> I have a (melted) data frame of several metal prices from 1980. I want to >> make a time series plot for each metal price. By default ggplot constructs >> single plot for all prices. Adding +facet_grid(variable~.) makes for each >> metal price a plot, but now there is another problem - scale of y axis. >> Some metals have price $1000 and some $2. Because ggplot makes same y scale >> for each metal, some metal prices printed as straight horizontal line. What >> is the command to make for each plot specific y axis scale? >> >> Currently I am trying command: >> >> ggplot(data=melted2, aes(x=date, y=value, group=variable, >> color=variable))+geom_line()+facet_grid(variable~.) >> >> >> Best regards, >> Maxim >> ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.