Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: st: attaching text and tables to graphs
From
"Richard Mc Gee" <[email protected]>
To
<[email protected]>
Subject
RE: st: attaching text and tables to graphs
Date
Fri, 10 Jun 2011 08:06:39 +1000
Thank you so much Eric, that's exactly what I wanted to do.
Best wishes,
Richard
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Eric Booth
Sent: Friday, 10 June 2011 12:08 AM
To: <[email protected]>
Subject: Re: st: attaching text and tables to graphs
<>
The | divider in the table was bothering me so, here it is after playing
with it a bit more--this time using the 'caption' option to build the second
column of values.
*************
sysuse auto, clear
forval n = 1/20 {
loc sidetable `" `sidetable' " `=make[`n']' " "'
}
di `"`sidetable'"'
forval n = 1/20 {
loc sidecap `" `sidecap' " $`=price[`n']'" "'
}
di `"`sidetable'"'
graph bar (mean) headroom price, ///
blabel(bar) note("{bf: MAKE }" ///
"-----------------" `sidetable' ///
, size(medsmall) color(green) ///
position(2) margin(small) ///
justification(left)) ///
caption(" {bf: Price }" ///
"---------" `sidecap' ///
, size(medsmall) color(midgreen) ///
position(2) margin(vsmall) ///
justification(right))
*************
Anyways, you probably get the point.
- Eric
__
Eric A. Booth
Public Policy Research Institute
Texas A&M University
[email protected]
On Jun 9, 2011, at 8:39 AM, Eric Booth wrote:
> <>
>
> BTW, you can use a loop to build your 'note' with some data from you
> dataset more quickly, e.g.,
>
> *************
> sysuse auto, clear
>
> forval n = 1/15 {
> loc sidetable `" `sidetable' " `=make[`n']' | `=price[`n']'"
"'
> }
> di `"`sidetable'"'
>
> graph bar (mean) headroom price, ///
> blabel(bar) note("{bf: MAKE |Price}" ///
> "---------------------------" `sidetable' ///
> , size(medsmall) color(green) ///
> position(2) margin(small) ///
> justification(right))
> ***********
> - Eric
> __
> Eric A. Booth
> Public Policy Research Institute
> Texas A&M University
> [email protected]
>
> On Jun 9, 2011, at 8:17 AM, Eric Booth wrote:
>
>> <>
>>
>> Something like this?
>> ********
>> sysuse auto, clear
>>
>> graph bar (mean) headroom price, ///
>> blabel(bar) note("{bf: MY DATA}" ///
>> "---------------" "1: `=make[1]'" ///
>> "2: `=make[2]'" "3: `=make[3]'" "4: `=make[4]'" ///
>> "5: `=make[5]'" "6: `=make[6]'" "7: `=make[7]'" ///
>> "8: `=make[8]'" "9: `=make[9]'" "10: `=make[10]'" ///
>> "Other: `=make[11]'", size(medium) color(green) ///
>> position(2) margin(medsmall) ///
>> justification(left))
>>
>> ********
>>
>> Also, take a look at this thread for other ideas:
>> http://www.stata.com/statalist/archive/2010-08/msg01131.html
>>
>> - Eric
>> __
>> Eric A. Booth
>> Public Policy Research Institute
>> Texas A&M University
>> [email protected]
>>
>>
>> On Jun 8, 2011, at 11:24 PM, Richard Mc Gee wrote:
>>
>>> Dear Statalist, I would like to attach a table/column of text to the
>>> right hand side of a graph and was wondering if you had any
>>> suggestions on how to achieve this? I already have information on
>>> yaxis 1 & 2 and would prefer not to move these i.e. I would like to
>>> have this information in addition to the graph. 'Graph combine'
>>> isn't quite right either.
>>> Thanks for your help,
>>> Richard McGee
>
>
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/