Bookmark and Share

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: drawing lines to points outside the specified range of plot


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: drawing lines to points outside the specified range of plot
Date   Wed, 30 Mar 2011 17:45:47 -0400

You need an intermediate step calculating the intersections of your
lines with the boundaries of the plot region--in Mata, presumably.
Should take zero seconds to execute, approximately.

On Wed, Mar 30, 2011 at 3:11 PM,  <[email protected]> wrote:
> Thanks a lot for the suggestions, however, I think I have not been clear enough
> in what my problem is so I'll try again;
>
> My goal is making plots like these:
>
> http://www.escholarship.org/uc/item/3b06127p?display=all#page-6
>
> (The paper gives R code which I'm trying to adapt for Mata)
>
> All the shown plots have (roughly)  x-range(-2,2) y-range (-2,2.5)
> The red lines are drawn by connecting paired coordinates. However, some
> coordinates/points are way outside the plot region (for example (-100,100)),
> where the lines project towards, while at the same time constraining the
> plotsize/axis-range to the same size. However this I can not manage in Stata:
> either the range has to be extended or the line is not drawn. So, as an simple
> example:
>
> twoway pci 1 1 30 30, xsc(r(0 50))
>
> can't be changed to
>
> twoway pci 1 1 30 30, xsc(r(0 5))
>
> since it then sets the range of the xsc to (0 30) automatically, which is
> normally the most logical of course.
>
> I hope this is a better description of the problem,
>
> regards Alex

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index