[R] Lines instead of points in a scatterplot

Angel Rodriguez angel.rodriguez at matiainstituto.net
Fri Sep 12 10:54:30 CEST 2014


Thank you, Vivek, but it hasn´t worked. I've tryed type="o" and type="h" to no avail.

Angel




-----Mensaje original-----
De: Vivek Das [mailto:vd4mmind at gmail.com]
Enviado el: vie 12/09/2014 10:50
Para: Angel Rodriguez
CC: R help
Asunto: Re: [R] Lines instead of points in a scatterplot
 
HI,

Try to change with

plot(aggr, type="l")

see what happens?

This should work

----------------------------------------------------------

Vivek Das


On Fri, Sep 12, 2014 at 10:32 AM, Angel Rodriguez <
angel.rodriguez at matiainstituto.net> wrote:

>
>
> Dear subscribers,
>
> I have the following dataframe:
>
> > aggr
>    child65$decedad       logit
> 1          [65,67)  0.00000000
> 10              67  0.00000000
> 2          [68,70) -0.06669137
> 3          [70,72) -0.71294981
> 4          [72,74) -0.59783700
> 5          [74,77) -1.08334482
> 6          [77,79) -1.88273125
> 7          [79,81) -1.21924028
> 8          [81,84) -1.94591015
> 9          [84,98] -1.65822808
>
> When I write:
>
> > plot(aggr)
>
> I get the correct scatterplot, but points are substituted by horizontal
> lines. I prefer points.
>
> If I write:
>
> > plot(aggr, pch=1)
>
> nothing changes
>
> > plot(aggr[,1],aggr[,2])
>
> nothing changes
>
> > plot(aggr, type="p")
>
> nothing changes
>
>
> Any idea?
>
> Best regards,
>
> Angel Rodríguez-Laso
>
>         [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at 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.
>
>


	[[alternative HTML version deleted]]



More information about the R-help mailing list