Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: How do I include quotes in a graph axis title?


From   Toyoto Iwata <[email protected]>
To   [email protected]
Subject   Re: st: How do I include quotes in a graph axis title?
Date   Fri, 16 Jul 2004 15:43:30 +0900

Dear Donath

`"Double "bouble quotation""' has been frequently introduced
in this list. I wish an example below may some help.
 
At 16:00 04/07/16 +1000, you wrote:
> 
> How do I include quotes in an axis (or legend) title? ie I want the axis 
> title to read:  number "fully" breastfeeding
> 
> I've tried using a local macro defined as char(34) but this doesn't work 
> because Stata interprets the quote after inserting the macro.
> 

And Dear Ramachandran,

If you have this data,

.input n freq
  1. 3 1
  2. 2 2
  3. 1 5
  4. 0 10
  5. end

. di 12/18
.66666667

dicrete probabilities should be

. gen p = ((12/18)^n)/(exp(lnfact(n))*exp(12/18))

. list

     +---------------------+
     | n   freq          p |
     |---------------------|
  1. | 3      1   .0253539 |
  2. | 2      2   .1140927 |
  3. | 1      5   .3422781 |
  4. | 0     10   .5134171 |
     +---------------------+

. gen p20 = 20*p

. graph twoway bar freq n || line p20 n, title(`""poisson" distribution"')

Perhaps this graph may be so rough for Ramachandran
that you have to browse over the graphics manual.

At 19:32 04/07/15 -0400, you wrote,

>Does anyone know how to superimpose a bar chart graph with a line graph
using Stata? >Specifically, I want to know how to use Stata 8.0 graphs to
superimpose a discrete outcome >bar chart with its Poisson probability line
graph.
 


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index