[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
Matthew Sydes <Matthew.Sydes@ctu.mrc.ac.uk> |

To |
"'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: RE: St: problems with gridlines in Stata 8.2 graphs |

Date |
Mon, 24 Nov 2003 16:29:25 -0000 |

Dear Nick, Thank you for taking the time to consider the problem. I had sent the full syntax that I had used for completeness. It is only the gridlines that are of relevance. I did not mean to detract from the problem in hand with the remainder of my bulky syntax. The data is indeed weekly - it relates to the number of patients (and proportion of patients) undergoing follow-up each week after randomisation on a randomised controlled trial by trial arm. The graph is being produced for quality assurance purposes. Patients are due to be seen every 13 weeks, hence the choice of gridline. I found it very interesting that you do not seem to experience the same problem. I should be interested in displaying to you a copy of the graph, and if you wish, providing you with the small dataset from which the graph was formed. Due to both the confidentiality of the data and the prohibition of files on the list I realise I cannot do this at this stage. Instead, I have constructed a small example that demonstrates the problem when I run it: clear input a b c x 3 4 5 1 2 3 6 2 3 5 8 3 4 5 9 4 5 6 10 5 6 3 8 6 1 4 9 7 end twoway (line a x,yaxis(1) c(J)) (line b x, yaxis(1) c(J)) (line c x, yaxis(2) c(J)), xtick(0(1)8,grid) Kind regards, Matt -----Original Message----- From: Nick Cox [mailto:n.j.cox@durham.ac.uk] Sent: 24 November 2003 15:57 To: statalist@hsphsun2.harvard.edu Subject: st: RE: St: problems with gridlines in Stata 8.2 graphs 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 n.j.cox@durham.ac.uk 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/ * * 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/

**Follow-Ups**:**st: RE: RE: RE: St: problems with gridlines in Stata 8.2 graphs***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**[no subject]** - Next by Date:
**st: Seeing through Windows** - Previous by thread:
**[no subject]** - Next by thread:
**st: RE: RE: RE: St: problems with gridlines in Stata 8.2 graphs** - Index(es):

© Copyright 1996–2014 StataCorp LP | Terms of use | Privacy | Contact us | What's new | Site index |