Not having your data, I can only try to
reproduce some simplified analogue of this
(I presume, perhaps incorrectly, that title
and many other options are secondary to the
question, although the implication of
your posting appears otherwise).
Whatever I do, the gridlines form background,
just as one would wish.
With your choice of
xtick(0(13)156, grid)
grid-lines are bound to make up
a fair fraction of the total visual
impact; or, otherwise put, you get what asked for.
I take it that these are weekly
data and that you want to identify quarters.
Perhaps half-years instead?
Nick
[email protected]
Matthew Sydes
> I am using Stata 8.2 (born
> on 30 Oct 2003) on a networked PC.
>
> I have produced a series of line graphs which include
> vertical gridlines in
> order to highlight some regular occurring factors using the
> -xtick, grid-
> option. (I have copied my syntax below - the grid is
> mentioned on the 8th
> row.)
>
> I find that the gridlines are being drawn on top of the
> graph lines instead
> of behind them. I wish to drawn the graph lines as steps,
> but if I do this,
> I appear to lose much of the graph behind the gridlines.
> Elsehow, the graph
> is produced how I would wish.
>
> #delimit ;
> twoway
> (line imm fuwks, c(J) yaxis(1))
> (line def fuwks, c(J) yaxis(1))
> (line unrand fuwks, c(J) yaxis(1))
> (line ppn fuwks, c(J) yaxis(2))
> ,
> xtitle(,size(medsmall)) xlab(0(26)156, labsize(small))
> xtick(0(13)156, grid)
> title("Patients with follow-up in a given week",
> size(medium))
> ytitle("N pts with `vname' in week X", axis(1)
> size(medsmall)) ylab(,angle(0) labsize(small))
> ytitle("Ppn pts with `vname' in week X", axis(2)
> size(medsmall)) ylab(0(0.08)0.24,angle(0) labsize(small) axis(2))
> legend(rowgap(2) colgap(-2) keygap(-2) margin(3 3 0 0)
> size(small) row(2))
> ;
> #delimit cr
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/