Hello, I managed to "linearize" my LDA decision boundaries now I would like to call abline three times but be able to specify the exact x range. I was reading the doc but it doesn't seem to support this use-case? are there alternatives. The reason why I use abline is because I first call plot to plot all the three datasets and then call abline to "append" these decision boundary lines to the existing plot ... Can anyone please advice? Thanks in advance, Best regards, Giovanni
On May 15, 2010, at 10:03 AM, Giovanni Azua wrote:> Hello, > > I managed to "linearize" my LDA decision boundaries now I would like > to call abline three times but be able to specify the exact x range. > I was reading the doc but it doesn't seem to support this use-case? > are there alternatives.?segments ?lines abline draws a line across the whole plot area, border to border. Both lines() and segments() will add to an existing plot (assuming it was done with base graphics).> The reason why I use abline is because I first call plot to plot all > the three datasets and then call abline to "append" these decision > boundary lines to the existing plot ... > > Can anyone please advice? > Thanks in advance, > Best regards, > Giovanni > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.David Winsemius, MD West Hartford, CT
On 05/16/2010 12:03 AM, Giovanni Azua wrote:> Hello, > > I managed to "linearize" my LDA decision boundaries now I would like to call abline three times but be able to specify the exact x range. I was reading the doc but it doesn't seem to support this use-case? are there alternatives. The reason why I use abline is because I first call plot to plot all the three datasets and then call abline to "append" these decision boundary lines to the existing plot ...Hi Giovanni, Try the ablineclip function in the plotrix package. Jim
The clip function will limit the area that other functions (including abline) plot to, so that is one option. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- > project.org] On Behalf Of Giovanni Azua > Sent: Saturday, May 15, 2010 8:03 AM > To: r-help at r-project.org > Subject: [R] abline limit constrain x-range how? > > Hello, > > I managed to "linearize" my LDA decision boundaries now I would like to > call abline three times but be able to specify the exact x range. I was > reading the doc but it doesn't seem to support this use-case? are there > alternatives. The reason why I use abline is because I first call plot > to plot all the three datasets and then call abline to "append" these > decision boundary lines to the existing plot ... > > Can anyone please advice? > Thanks in advance, > Best regards, > Giovanni > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code.