[R] Over lay 2 scale in same plot

Joshua Wiley jwiley.psych at gmail.com
Fri Sep 10 16:01:37 CEST 2010


Hi Mamum,

You can look at the ylim argument to plot().  It lets you control the
limits; however, in your example graph, part of the issue is that the
bars have a much higher value, so you could not change ylim too much
(looks like in your example graph you could set it to something like
ylim = c(0, 7) ? ).

Josh

On Fri, Sep 10, 2010 at 5:43 AM, mamunbabu2001 <mrashid_9 at hotmail.com> wrote:
>
> Hi Josh,
> Thanks for your reply. I gave a reply yesterday but found that it was not
> posted.
> I managed to plot the bar pot and overlay points.
>
> The problem I am facing now is the spread of Y scale. The values I am
> plotting
> in Y scale are very close. so they look pretty flat. (lowest value 7.5 and
> highest
> value 8.5 , so if the ranges in y scale is 6-8, 8-10 , the values looks
> pretty flat.)
> How can I make the spread of Y scale i.e 6.2 - 6.4 - 6.6 -  ...... 8.8 - 10
> so that
> values does not look flat. I have added an image below.
>
> http://r.789695.n4.nabble.com/file/n2534370/_GE_and_CN_Combined_Plot_mod.png
>
> Thanks in advance.
>
> regards,
> Mamun
> --
> View this message in context: http://r.789695.n4.nabble.com/Over-lay-2-scale-in-same-plot-tp2528661p2534370.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>



-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/



More information about the R-help mailing list