Se ha borrado un texto insertado con un juego de caracteres sin especificar... Nombre: no disponible Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080212/16ba8b97/attachment.pl
Try this. ggplot(data = DF, aes(x=Hora, y=PAC) + geom_line() HTH, Thierry ------------------------------------------------------------------------ ---- ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance Gaverstraat 4 9500 Geraardsbergen Belgium tel. + 32 54/436 185 Thierry.Onkelinx op inbo.be www.inbo.be Do not put your faith in what statistics say until you have carefully considered what they do not say. ~William W. Watt A statistical analysis, properly conducted, is a delicate dissection of uncertainties, a surgery of suppositions. ~M.J.Moroney -----Oorspronkelijk bericht----- Van: r-help-bounces op r-project.org [mailto:r-help-bounces op r-project.org] Namens Gallego Liberman, Matias Verzonden: dinsdag 12 februari 2008 12:06 Aan: r-help op r-project.org Onderwerp: [R] problems plotting geom_line on ggplot2 Hi! My problem is similar to an already posted one, but the proposed solution did not work. I'm not able to make a line type plotting on ggplot2 package this is the code and the error> DFHora PAC 640 10:00:00 13960 673 10:15:00 15690 790 10:30:00 17200 884 10:45:00 18580 932 11:00:00 20440 1027 11:15:00 22680 1157 11:30:00 9340 1253 11:45:00 6540 1294 12:00:00 23590 1389 12:15:00 23750 1526 12:30:00 22080 1595 12:45:00 17070 1689 13:00:00 19370 1766 13:15:00 20640 1869 13:30:00 24650 1951 13:45:00 23940 2033 14:00:00 18740 2127 14:15:00 19340 2210 14:30:00 22860 2305 14:45:00 23510 2371 15:00:00 16110 2460 15:15:00 23770 2526 15:30:00 23270 2617 15:45:00 20310 2722 16:00:00 11410 2820 16:15:00 22560 2901 16:30:00 21570 2979 16:45:00 20730 3060 17:00:00 19780> p<-geom_line(mapping=aes(x=Hora,y=PAC),data=DF) > ggplot()+pError en do.call("gList", panels) : second argument must be a list may anybody help me, please? M. [[alternative HTML version deleted]] ______________________________________________ R-help op r-project.org 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.
Just to inform the list that the problem is solved: This problem was due to DF$Hora being a factor. Converting it to numeric or time solved the problem. Thierry ------------------------------------------------------------------------ ---- ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance Gaverstraat 4 9500 Geraardsbergen Belgium tel. + 32 54/436 185 Thierry.Onkelinx op inbo.be www.inbo.be Do not put your faith in what statistics say until you have carefully considered what they do not say. ~William W. Watt A statistical analysis, properly conducted, is a delicate dissection of uncertainties, a surgery of suppositions. ~M.J.Moroney -----Oorspronkelijk bericht----- Van: r-help-bounces op r-project.org [mailto:r-help-bounces op r-project.org] Namens Gallego Liberman, Matias Verzonden: dinsdag 12 februari 2008 12:06 Aan: r-help op r-project.org Onderwerp: [R] problems plotting geom_line on ggplot2 Hi! My problem is similar to an already posted one, but the proposed solution did not work. I'm not able to make a line type plotting on ggplot2 package this is the code and the error> DFHora PAC 640 10:00:00 13960 673 10:15:00 15690 790 10:30:00 17200 884 10:45:00 18580 932 11:00:00 20440 1027 11:15:00 22680 1157 11:30:00 9340 1253 11:45:00 6540 1294 12:00:00 23590 1389 12:15:00 23750 1526 12:30:00 22080 1595 12:45:00 17070 1689 13:00:00 19370 1766 13:15:00 20640 1869 13:30:00 24650 1951 13:45:00 23940 2033 14:00:00 18740 2127 14:15:00 19340 2210 14:30:00 22860 2305 14:45:00 23510 2371 15:00:00 16110 2460 15:15:00 23770 2526 15:30:00 23270 2617 15:45:00 20310 2722 16:00:00 11410 2820 16:15:00 22560 2901 16:30:00 21570 2979 16:45:00 20730 3060 17:00:00 19780> p<-geom_line(mapping=aes(x=Hora,y=PAC),data=DF) > ggplot()+pError en do.call("gList", panels) : second argument must be a list may anybody help me, please? M. [[alternative HTML version deleted]] ______________________________________________ R-help op r-project.org 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.
On Feb 12, 2008 9:12 AM, ONKELINX, Thierry <Thierry.ONKELINX at inbo.be> wrote:> Just to inform the list that the problem is solved: > > This problem was due to DF$Hora being a factor. Converting it to numeric > or time solved the problem.This is because geoms are automatically broken into groups based on the combination of all categorical variables used in the plot - which obviously causes problems in this case. The correct solution is to override the default grouping with group = 1. I do need to document this better somewhere. Hadley -- http://had.co.nz/
Reasonably Related Threads
- CH7007A (AKA CH7006) TV OUT Support for NV11 (NVidia GeForce2 Go Dell I8K Laptop)
- Read error: #<TypeError: can't modify frozen string> raised from HttpParser
- ggplot- using geom_point and geom_line at the same time
- Problem with geom_line
- geom_line: How to plot two data sets having different maximum X-axis values in a single plot?