Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: RE: The Future of Statistical Computing


From   Sergiy Radyakin <[email protected]>
To   [email protected]
Subject   Re: st: RE: RE: The Future of Statistical Computing
Date   Mon, 26 Jan 2009 11:47:09 -0500

I think the future of statistical computing should not depend on the
possibility to put a legend inside or outside of a graph. So perhaps
we could split this thread into:

1. implementing new types of graphs
2. enhancing existing types of graphs.

All graphs are implemented as .ado files (and this is the reason that
they are so painfully slow, especially the first time a graph is
built). Mata has brought nothing new - AFAIK it is not used anywhere
in the graphing commands. Until version 9 one undocumented command was
handling all low-level painting in Stata. In version 10 additional
(undocumented) commands handle interaction with the graph editor.

It is possible to draw pie-charts yourself without calling -graph
pie-. And the trace of it actually illustrates how one could do it
himself/herself.
A good gallery of standard graphs is here:
http://www.ats.ucla.edu/stat/stata/library/GraphExamples/default.htm
I wish Mitchell's book had couple of pages with _just thumbnails_ of
graphs to help decide "how do I want to plot my data".
I had a look at the suggested gallery of R-graphs and some 3D graphs
would be nice to have in Stata. In particular I'd like to have
something like "An other perspective plot of the Maunga Whau", but
just because it looks cool. The 2D graphs look nothing special. Some
can be reproduced easily with standard commands, some require
non-traditional use of standard commands but also feasible. I couldn't
immediately spot a single graph that it is not be possible to do in
Stata after some programming. My understanding is that these are also
not standard R graphs, but rather examples of what can be drawn in R
after applying some effort. As for the quality of the graphs, they
make me feel like they are from the "previous generation" of graphics,
something which was practiced before antialiasing was developed
(similar to Stata 7 graphics).

Obviously with plugins one can draw anything "in Stata" (quoted
because how do you determine "where" it is drawn then??). But plugins
are under fire here...

At the low level one has more freedom to draw whatever one wants, but
has to decide, whether the graph should be compatible with other kinds
of graphs, e.g. a twoway graph for standard "||-overlays" and legend
merging, or a completely new type of graph where one has to implement
titles, legends, axis, etc. In many cases all this can be inherited
from Stata's standard graphs, and only the drawing procedure overriden
with a custom one.

Indeed, when I wrote "undocumented" I didn't mean that there is no
documentation for using graphs in Stata. Besides extensive manuals,
there also Mitchell books available, but AFAIK they don't mention a
single chapter on how standard graphs can be extended. Rather they
focus on how-to-rotate-the-labels-of-the-ticks-of-the-x-axis kinds of
questions, which are important when you get frustrated that something
is not rendered as you wish, but they are not anywhere near the
fundamentals of what graphical capabilities are there. Information on
"what-is-under-the-hood" is scarce, but can be found in surprising
places.

E.g. one of the R-graphs in that gallery was a sunflower plot. How
many of the readers here knew that Stata does sunflower plots??? Check
it out:
which sunflower.ado
help sunflower

Once you get to it and look at how it works, you are one step further
to developing graphing commands at the very basic level, rather than
combining the existing commands trying to get the desired effects.
This way is neither easy nor fast, but you can get something that you
can't get by any other means. See, e.g. my parea command (findit
parea), which does pattern fills often requested and blamed in the
statalist.

David asked to share the code. Yes I do plan to prepare a presentation
on this for one of the summer user group meetings, where I can
demonstrate how the graphs like shown in the links can be done in
Stata. And I mean Stata 9 and 10, not necessarily 10 - GraphEditor
IMHO does not contribute anything to building graphs, it is more of a
control of the graph's window. BTW there was a text-only predecessor
of the Graph Editor in Stata 9, which I wish I knew earlier about. All
those graphs I posted can also be drawn in Stata 9, so they should not
motivate anyone to hurry for an update. I just kept the Graph Editor's
buttons and menus on the window screenshot.

Also Maarten, could you please remind me what is the problem with the
greek letters in Stata graphs? It should be possible to display
greek/english letters with no problem in Stata. E.g I currently can
display english/cyrillic and it depends on the localization of the
computer. Just select "Arial Greek" instead of "Arial" (I select
"Arial Cyr" for "Arial Cyrillic") and select extended language
settings in Control Panel's Internatialization applet to apply greek
page to all extended non-unicode symbols. This will not allow you put
complex formulas into your graphs, but those could be rendered in a
different application and merged together I suppose.

Best regards,
    Sergiy Radyakin

On Mon, Jan 26, 2009 at 8:57 AM, Neil Shephard <[email protected]> wrote:
> On Mon, Jan 26, 2009 at 1:51 PM, Maarten buis <[email protected]> wrote:
>>
>> However, rather than trying to wade through all these links, I would
>> start with -help graph intro- as this give you the basic introduction
>> to building graphs in Stata. You can also find a link to
>> -help graph intro- at at the bottom of -help graph-.
>
> An excellent exposition on the capabilities of Stata graphs is also
> provided by...
>
> Mitchell MN (2008) A Visual Guide to Stata Graphics, 2nd Edition.  Stata Press
>
> Available from : http://www.stata.com/bookstore/vgsg.html
>
> Neil
> --
> "We should make things as simple as possible, but not simpler."  -
> Anon (not Albert Einstein)
>
> Email - [email protected]
> Website - http://slack.ser.man.ac.uk/
> Photos - http://www.flickr.com/photos/slackline/
> *
> *   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/



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