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

RE: st: Creating new graph properties dynamically

From   "Nick Cox" <>
To   <>
Subject   RE: st: Creating new graph properties dynamically
Date   Fri, 10 Aug 2007 12:30:45 +0100

Thanks to Maarten for the plug, but Sergei would look in 
vain through my graphics programs for examples 
of class programming [technical sense]. I say 
"class" as this is one key word; it might be better
to say "object".  

Back-tracking: Sergei thinks he has a graphics problem 
for which application of class programming is
the answer. I can't be clear whether that is true,
as I don't understand his question, nor do I have
a sense of the underlying problem. 

Either way, I don't think there is any more written
on the subject than he has found. StataCorp expressed
an intention to write this up for user-programmers
when Stata 8 was introduced, but then they changed 
their minds. 

My reading of the runes and listening on Statalist 
and at users' meetings leads me to these statements: 

1. A very few people think they want to read about 
class programming in graphics. 

2. A very few people think they need to read about 
class programming in graphics. 

3. Vince's talks in particular, and you didn't need
to be there because the talk materials are downloadable, 
show that you can do some very clever things with it. 

4. However, explaining it all properly, especially if
you take account of the fact that not all the potential
readership know about classes/objects, would probably
take at least a small book. 

5. And there are plenty of other ways to do clever
things with Stata graphics that are well documented. 

6. You add all that up, and I think it boils down 
to it being unlikely that you are going to see much else 
written down. It's not a good use of StataCorp resources
to put a lot of effort into something that will have
only a very limited appeal. They have no interest in 
hiding it; StataCorp too would benefit the more people
knew how to do very clever things with their graphics. 
But explaining it all would be a big deal. 

7. I would be happy if StataCorp made a fool of me 
by doing what I guess they won't. 


Maarten buis
> --- "Sergiy R." <> wrote:
> > I need to create a new graph with a custom property field.
> > I can do it after the graph is plotted, by typing:
> > 
> > .Graph.Declare string MyField="MyValue"
> > 
> > But I need to do this during the construction of the graph object.
> > (the resulting class must belong to the twoway family of graphs).
> > 
> > I am aware of -twoway sunflower-, -twoway estfit- and Vince Wiggins'
> > 2004 graphics talk examples. These however seem to be 
> insufficient to
> > resolve my question. I would appreciate if more custom graphics
> > commands are pointed to me as examples.
> I am not sure what you mean with a "custom property field". 
> However you
> seem to look for other user written twoway graph commands, to use as
> examples. Nick Cox has written a number twoway graph commands. A list
> can be found in -njc_stuff- downloadable from -ssc-

*   For searches and help try:

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