Statalist The Stata Listserver


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

Re: st: Some graph questions


From   RJ Harris <ross.harris@bristol.ac.uk>
To   David Fisher <djfisher81@msn.com>, statalist@hsphsun2.harvard.edu
Subject   Re: st: Some graph questions
Date   Thu, 22 Feb 2007 17:14:59 -0000

Hi there

First off I would recommend having a look at the updated (v9 graphics) metan command if you have not done so already!

If you really want to do it yourself this how the new metan works in these respects:

To get the variable titles, I simply added extra lines with the variable titles in at the top of the data, then put a yline between them on the graph (I also add a gap).

The columns of data work by scatter plots of identical x values and ascending y values- as you seem to have done. These are taken to be the left edge of the column, and they are labelled using mlabpos(3) - this keeps them lined up correctly by putting the label to the right of the scatter points.

If you haven't specified a position, this is probably what is causing your problem. If not, it may be that the graph doesn't quite look right on your screen. Sometimes I've noticed lines on graphs don't quite look right on screen, but once they're printed everything looks fine.

Cheers,
Ross


--On 22 February 2007 14:02 +0000 David Fisher <djfisher81@msn.com> wrote:


:01C7568A]
Sender: owner-statalist@hsphsun2.harvard.edu
Precedence: bulk
Reply-To: statalist@hsphsun2.harvard.edu
Errors-To: statalist-owner@hsphsun2.harvard.edu
Hi all,

I'm attempting to create forest plots along the lines of those produced by
the "meta" or "metan" commands, but using new-style (v8+) graphics syntax
s= o
I can then modify them.  I'm getting pretty close, but can't see a
solution to the following:

The "metan" command gives you the trial names to the left of the y-axis,
an= d
effect sizes, confidence intervals and % weights to the right of the
y-axis= =2E
    This I can re-produce.  However, these columns of variable lables also
have titles directly above them, as a heading.  Using the axis title
option= s
I can only get the titles to appear off to the left or right of the
variabl= e
lables, not directly above them.  Is this possible?

Also, a more minor point:  to get the trial names to the left and effect
sizes etc to the right, I've used multiple axes, with two identical y-vars
with different value labels.  However, even after specifying the axis
range and scales identically, they still don't seem to quite line up with
each other.  Almost, but not quite.  Any thoughts?

Thanks in advance,

David Fisher.

_________________________________________________________________
MSN Hotmail is evolving =96 check out the new Windows Live Mail
http://ideas.live.com

*
*   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/


----------------------
Ross Harris
Department of Social Medicine
University of Bristol
+44 (0)117 928 7338
Ross.Harris@bristol.ac.uk
*
*   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/



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