# [R] Odp: x-axis

Petr PIKAL petr.pikal at precheza.cz
Mon Jan 28 16:41:25 CET 2008

```Hi

r-help-bounces at r-project.org napsal dne 28.01.2008 13:06:16:

> Hi,
>
>   I want to plot a graph and here is my code:
>
>    ec<-rep(0,length(e))
>  fc<-rep(0,length(f))

Strange. If I understand correctly, you repeat zero length(e) or length(f)
times and then you plot those zeroes at x axis = e values and another set
of zero points at different x points based on f values. Why?

BTW, didnt you want to do dotchart? Or maybe to can consider logaritmic x
axis?

Regards
Petr

>  plot(e,ec,type="p",col=1,pch=19)
>  points(f,fc,col=2,pch=20)
>  legend(1.0e+08,1.0,c("dog",
"human"),text.col="green4",pch=c(19,20),col=c(1,2))
>
>   my major problem here is the x-axis is too large in scale and its very
hard
> for me to read the x-points  from my graph. Can I change the x-label
too??
>   e:
>    [1]  17358865  17966995  21306539  27880531  34166504  36111044
36266288
>  [8]  36854306  43786190  44322336  45529444  46302360  53479132
58567262
> [15]  60564442  72637088  79875476  93155112  94372260  96643396
103123936
> [22] 116908456 131781664 132968364 135945080 141788832 149924864
156539568
> [29] 157817896 162399496 168344072 173146584 176302744 182878168
183946152
> [36] 185068720 190791232        NA
>
>  f<-[1]  17906353  21295547  27880531  34118702  35395488  36132622
37916920
>  [8]  43786190  44322336  46302360  53494622  62105336  63817440
72637088
> [15]  79875476  94545992  96506368 103123936 116908456 126190072
127446552
> [22] 131781664 154658264 176302744 181670472 182625272 182878168
183946152
> [29]        NA
>
>    cheers,
>   Anisah
>
>
> ---------------------------------
>
>    [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help