Hi Amna,
To have more control on the grid of your plot use the grid function.
Remove the tck argument from your plot call and add, as following:
plot(Year,Dir,ylab="Annual Maximum Daily Rainfall
(mm)",cex.lab=1.3,type="o",lab=c(20,20,25),mgp=c(2.5,1,0),asp=1)
grid()
See ?grid to see how to customize the grid lines.
Julian
amna khan wrote:> Hi Sir
>
> There is a difficulty in creating a comprehensive graph.
> Suppose I have a time series from 1967 to 2006. I have used the
> following R
> code for creating a graph.
>
>> plot(Year,Dir,ylab="Annual Maximum Daily Rainfall
(mm)",cex.lab=1.3
> ,type="o",lab=c(20,20,25),mgp=c(2.5,1,0),tck=1)
> The graph is attached with this email.
> Sir I want the grid lines as dashed lines. Second thing to be asked is
> that
> the grid lines should make squared blocks not rectangles. Moreover the
> boundries are not in good format.
>
> Sir I request you to please guide in this regards.
>
> Thank You.
>
>
>
>
> ------------------------------------------------------------------------
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>
--
Julian M. Burgos
Fisheries Acoustics Research Lab
School of Aquatic and Fishery Science
University of Washington
1122 NE Boat Street
Seattle, WA 98105
Phone: 206-221-6864