[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: RE: St: problems with gridlines in Stata 8.2 graphs
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:
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
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)
From: Nick Cox [mailto:email@example.com]
Sent: 24 November 2003 15:57
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
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?
> 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
> 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 ;
> (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",
> 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:
* For searches and help try: