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

From |
"Sergiy Radyakin" <serjradyakin@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Transparent graph |

Date |
Tue, 30 Sep 2008 22:37:51 -0400 |

Dear Joseph, thank you very much for the hint. I came up to a similar solution already: splitting the whole chart into a number of smaller elements, for which I can determine it's color. I also precompute the colors for the areas of overlaps. However, because in my case I am dealing with the curves (not lines, as in Mr. Mander's program), which means solving nonlinear equations to find the intersection points. (unfortunately no analytical solution exists, but an approximation is fine: we are dealing with pixels in the end anyways). In my case it is a very simple picture, so I ended up precomputing the points of intersection using a numerical math package, but drawing it could be trivial if transparency was somehow made available to the Stata programmers. Thank you all for giving me hints on the topic. The problem is now resolved. Sergiy On Tue, Sep 30, 2008 at 12:06 PM, Joseph Coveney <jcoveney@bigplanet.com> wrote: > Sergiy Radyakin wrote: > > I am writing a graphing procedure (directly with Stata's undocumented > gdi commands). There is a pseudo-transparency effect as can be seen > below: > > sysuse auto, clear > generate ww = weight * 2.85 > twoway area price ww l, sort fi(100 100) > twoway area price ww l, sort fi(30 30) > > Is it possible to achieve "true-transparency" (where the first "blue" > graph could be seen through the second "pink")? > > In technical terms: does gdi shadelevel set color or the method of > drawing (SET,OR,AND,XOR)? I.e. is it equivalent to > gdi shadergb = `i' * `R' `i' * `G' `i' * `B' > ?? > > -------------------------------------------------------------------------------- > > Adrian Mander has written something that might help you get closer to what > you're looking for. He mentions it in this post: > > http://www.stata.com/statalist/archive/2006-10/msg00018.html > > Joseph Coveney > > > * > * 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/

**References**:**Re: st: Transparent graph***From:*"Joseph Coveney" <jcoveney@bigplanet.com>

- Prev by Date:
**Re: st: Verify randomization in a large sample** - Next by Date:
**RE: st: Verify randomization in a large sample** - Previous by thread:
**Re: st: Transparent graph** - Next by thread:
**st: re: how to link the help file for a command to its immediate** - Index(es):

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