[R] Lines instead of points in a scatterplot

Vivek Das vd4mmind at gmail.com
Fri Sep 12 10:50:14 CEST 2014


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