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: How to graph this.
From
Nick Cox <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: How to graph this.
Date
Mon, 3 Feb 2014 14:49:52 +0000
Thanks for the link. In principle, part of that could be done in
Stata. In practice, you'd need to assemble many ad hoc calls to plot
individual tiles, some with and some without annotation, as I don't
think there is a canned command to do it.
However, a major detail here which you didn't mention earlier is that
this graphic is interactive, so that mousing over major cells causes
pop-ups (as an old fogey I may not have the jargon right). I don't
think Stata supports that kind of graphic, although it's standard
stuff in many languages.
What would be easier in Stata is a bar or dot chart, showing major
categories, alongside another showing minor categories. I'd suggest
that would be about as useful and informative, if not so impressive.
Nick
[email protected]
On 3 February 2014 14:34, Amadou DIALLO <[email protected]> wrote:
> Indeed, I believe this might be rather difficult to implement. We're
> working on economic complexity for African products and my boss wants
> me to reproduce graphs like this
> (http://atlas.media.mit.edu/explore/tree_map/export/usa/all/show/2010/).
> So far, I am using stacked graph bars (each one representing the share
> of total value but with over 200 products, this is not well
> rendering). I believe Hausmann and Hidalgo and their team might be
> using a dedicated software to plot such graphs, but we have no clue of
> which one they are using. If not doable in stata, does any one know
> which tool is better appropriate?
2014-02-03, Nick Cox <[email protected]>:
>> I agree with Maarten. -spineplot- was written up in Stata Journal 8(1)
>> 2008 but it's not for arbitrary tilings with area proportional to
>> value.
>>
>> If you have identifiers for the incomes, and the number is modest, I
>> find it hard to see advantages in your design over -graph hbar- or
>> -graph dot-. Otherwise, some kind of quantile, distribution or Lorenz
>> plot seems indicated.
On 3 February 2014 12:08, Maarten Buis <[email protected]> wrote:
>>> That looks like a mosaic plot. As far as I know, the only version of a
>>> mosaic plot that has been implemented in Stata is Nick Cox's
>>> -spineplot- (available from SSC), However that is for two-dimensional
>>> problems, i.e. involving two variables, and you seem to have a
>>> one-dimensional problem, i.e. one variable. I don't think that what
>>> you were asked to do is a very good idea: look at how your information
>>> is stored in the graph. It is there in terms of the area of different
>>> blocks. Humans are pretty bad at interpretating areas, so your graph
>>> is not a very efficient way of conveying information.
On Mon, Feb 3, 2014 at 10:49 AM, Amadou DIALLO <[email protected]>
>>>> I've been asked to produce the following graph, but couldn't find a
>>>> way to do it.
>>>> Let's say you have 3 individuals whose income are
>>>>
>>>> obs inc
>>>> 1 75
>>>> 2 12.5
>>>> 3 12.5
>>>>
>>>> I want to have the following graph: a matrix of total income, where
>>>> each individual's share will be plotted.
>>>>
>>>> ---------------------------------------------
>>>> | | |
>>>> | | 12.5 |
>>>> | 75 | -------- |
>>>> | | 12.5 |
>>>> | | |
>>>> ---------------------------------------------
>>>>
>>>> If possible, I want to add labels and plot each box with a different
>>>> color. Of course, in my sample, I have more observations.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/