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 <[email protected]> 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/